Add auto encode/decode test case