To test, I energize the brakes
from the 7 pin plug using two pieces of metal, small nails will work, and a wire with alligator clips on each end. I connect the 12 volt supply (battery) to the brake line. With a wheel jacked, I have a helper spin the wheel and make the connection. If the wiring is good, the wheel stops.
That said, if I were buying a used trailer I would want to have the bearings greased. To do this the drum has to be removed. As Joe suggests, checking the condition af the brakes is easy to do with the drum off.
As far as replacement, I redid mine using Dexter parts I bought from etrailer for about $250. That was brakes mounted on a backing plate, drums, new bearings, etc. If you have it done at a local shop brakes and bearings should be less than $500.
Don't forget to check the date on the tires
. If they need replacing add $200 to the bill. Good luck, Raz