Add test for serialize/deserialize.
Additional test coverage.