The headlight gets AC power, via the yellow stator lead, only while the engine is running.
Easiest way to bench test the electrical system is to disconnect the wire harness, at the stator plug. Then, feed 6v (you can use the battery) to both the white & yellow leads, using test leads (jumpers).cGround can be run to the engine, or chassis, just needs to be bare metal. Connect the ground first, then look for arcing/sparks as you connect the (+) from the power source...that would indicate a dead short, a fire hazard, that needs to be tracked down.