add test case for serialization