Encoder unit tests

flip encoder tests to separate unit tests

complete! :)