more tests for encoder