You can check if the encoder is working with voltmeter.
- Make sure no static conditions present
- Remove encoder cover
- Supply only 5 volts to pin 4 of encoder and ground to pin 1.
- Turn encoder very very very slowly and watch for change in state (Hi/Lo) on each channel A & B
- If voltage goes hi and lo on each channel, then encoder is good.