You can test a trailer's brake switch by directly applying +12V power from a fully-charged battery. You can apply this power to the hot and ground contacts on the trailer's plug. Or to an individual brake assembly's two wires.