Add tests for ClassMetadataFactory