Added partial tests for Encoder

Encoder simulation and Pulses counter (one channel).