One diagnostic technique on physical examination to detect a hydrocele is transillumination of the fluid-filled space with a light applied to the scrotum. The fluid will transmit the light, while a solid mass will not.