Add tests for Decoder.