Some tests for the encoder.