Fix encode / decode test case