The student pilot was receiving instruction for an endorsement on the aircraft type. Following a touch and go landing, the instructor closed the throttle to simulate an engine failure. The subsequent landing was firm and the right wheel broke off. The aircraft ground looped through 180 degrees before coming to rest. Inspection of the gear leg revealed severe corrosion in the internal section of the leg. The right maingear leg failed on landing due to corrosion. This corrosion apparently had not been detected during the most recent periodic and major inspections, and there was no evidence that the bore of the maingear leg had been coated and sealed to prevent ingress of moisture.