Add tests for deserialization