added encoder/decoder tests