encoder tests