Add tests for the encoder monitor.