Add Encoder unit tests
Encoder unit tests finalysed. To be tested