encoder test