Test encoder