Employee was performing maintenance on a Double Dump Valve, and the upper flapper was partially open, so he turned the air on to the actuator to see if it would close. The mechanic thought possibly the cylinder was not working and he put his hand on the underside of the flapper and it closed shut and slammed his thumb in the door.