Add basic test case of serialization.