Add a test for ClassMetadata serialization
Remove useless check in YamlDriver