The best way(correct way) to test a logic level rotary encoder. Such as the ones found on Raymond trucks, is to use an oscilloscope. Sure you will see a voltage with a DMM set to AC. But you still have no idea if the encoder is working properly. It could be missing pulses on either channel A or B, or have a noisy channel. A bad encoder can still "test" ok with a DMM, yet cause all kinds of strange drivability issues.
Optical encoders (found in most Raymond steer motors and steer tillers, and belt driven drive motor speed encoders) will produce no voltage when turned by hand and disconnected by the way. They require a +5V supply to function.
You are most likely confusing the speed sensor on some drive motors that use teeth on a wheel pressed onto the armature as a pickup. That is not an "encoder", it is an pickup coil and reluctor wheel. That will produce AC voltage when the armature is rotated.
This is ONLY to be used to report flooding, spam, advertising and problematic (harassing, abusive or crude) posts.