Add tests to ensure encoders are generated properly