Add encoder/decoder tests