Neutral Safety Switch

The purpose of the neutral safety switch is to prevent the starter from engaging in any other gear than neutral. Back in the days of our old cars, it was used only on automatic transmissions. Electrically, it worked by a wire (generally brown) running from the starter relay to the transmission where the neutral safety switch threaded into the casing. If the relay saw ground, it allowed the starter to crank. Mechanically, the switch worked by a spring loaded pin contacting a lever inside the transmission where ground was made. If the lever was in any other position than neutral, the switch pin did not contact anything; no ground, no crank.

Testing the switch
Since it isn't really a switch (there is no on and off), you need only test for continuity from the wire post to the spring loaded pin, and test for no continuity between the wire post and the body.

Typical failures
Breakage of the spring behind the pin, allowing the pin to retract within the body.
Loss of insulation between the wire post and the body.
The pin getting stuck within the body due to sticky old and debris.
Transmission fluid leakage due to failed O ring.

The key thing to remember
It is a spring loaded grounding pin, not a switch.