}
// HBX-718
public void testNonMutatedInheritance() {
PersistentClass cm = cfg.getClassMapping("org.hibernate.test.legacy.Wicked");
MetaAttribute metaAttribute = cm.getMetaAttribute( "globalmutated" );
assertNotNull(metaAttribute);
/*assertEquals( metaAttribute.getValues().size(), 2 );
assertEquals( "top level", metaAttribute.getValues().get(0) );*/
assertEquals( "wicked level", metaAttribute.getValue() );
Property property = cm.getProperty( "component" );
MetaAttribute propertyAttribute = property.getMetaAttribute( "globalmutated" );
assertNotNull(propertyAttribute);
/*assertEquals( propertyAttribute.getValues().size(), 3 );
assertEquals( "top level", propertyAttribute.getValues().get(0) );
assertEquals( "wicked level", propertyAttribute.getValues().get(1) );*/
assertEquals( "monetaryamount level", propertyAttribute.getValue() );
org.hibernate.mapping.Component component = (Component)property.getValue();
property = component.getProperty( "x" );
propertyAttribute = property.getMetaAttribute( "globalmutated" );
assertNotNull(propertyAttribute);
/*assertEquals( propertyAttribute.getValues().size(), 4 );
assertEquals( "top level", propertyAttribute.getValues().get(0) );
assertEquals( "wicked level", propertyAttribute.getValues().get(1) );
assertEquals( "monetaryamount level", propertyAttribute.getValues().get(2) );*/
assertEquals( "monetaryamount x level", propertyAttribute.getValue() );
property = cm.getProperty( "sortedEmployee" );
propertyAttribute = property.getMetaAttribute( "globalmutated" );
assertNotNull(propertyAttribute);
/*assertEquals( propertyAttribute.getValues().size(), 3 );
assertEquals( "top level", propertyAttribute.getValues().get(0) );
assertEquals( "wicked level", propertyAttribute.getValues().get(1) );*/
assertEquals( "sortedemployee level", propertyAttribute.getValue() );
property = cm.getProperty( "anotherSet" );
propertyAttribute = property.getMetaAttribute( "globalmutated" );
assertNotNull(propertyAttribute);
/*assertEquals( propertyAttribute.getValues().size(), 2 );
assertEquals( "top level", propertyAttribute.getValues().get(0) );*/
assertEquals( "wicked level", propertyAttribute.getValue() );
Bag bag = (Bag) property.getValue();
component = (Component)bag.getElement();
assertEquals(4,component.getMetaAttributes().size());
metaAttribute = component.getMetaAttribute( "globalmutated" );
/*assertEquals( metaAttribute.getValues().size(), 3 );
assertEquals( "top level", metaAttribute.getValues().get(0) );
assertEquals( "wicked level", metaAttribute.getValues().get(1) );*/
assertEquals( "monetaryamount anotherSet composite level", metaAttribute.getValue() );
property = component.getProperty( "emp" );
propertyAttribute = property.getMetaAttribute( "globalmutated" );
assertNotNull(propertyAttribute);
/*assertEquals( propertyAttribute.getValues().size(), 4 );
assertEquals( "top level", propertyAttribute.getValues().get(0) );
assertEquals( "wicked level", propertyAttribute.getValues().get(1) );
assertEquals( "monetaryamount anotherSet composite level", propertyAttribute.getValues().get(2) );*/
assertEquals( "monetaryamount anotherSet composite property emp level", propertyAttribute.getValue() );
property = component.getProperty( "empinone" );
propertyAttribute = property.getMetaAttribute( "globalmutated" );
assertNotNull(propertyAttribute);
/*assertEquals( propertyAttribute.getValues().size(), 4 );
assertEquals( "top level", propertyAttribute.getValues().get(0) );
assertEquals( "wicked level", propertyAttribute.getValues().get(1) );
assertEquals( "monetaryamount anotherSet composite level", propertyAttribute.getValues().get(2) );*/
assertEquals( "monetaryamount anotherSet composite property empinone level", propertyAttribute.getValue() );
}