Add test to assert metadata serialization