The cover sensor is optical, based on the reflected signal. You can wipe the reflector with a dust cloth. If there is a sheet, it should turn on the "operation" LED.
The encoder is more difficult, it gives three signals to the main controller. It can be checked by starting the machine in the setup mode in different angular positions and checking the operation of the automation with the "eye", evaluating the correctness of the stop in the selected position.