test encoder & pass test