The emergency hoist was being inspected during the quarterly exam and when the examiner engaged the down function on the hoist the hoist malfunctioned and started unwinding while still sitting on the surface platform. During the investigation it was discovered that the cage rest sensor was bad.