*
* @throws Exception for any problem
*/
public void testEquals() throws Exception
{
CompositeMetaType compositeMetaType = initCompositeMetaType();
Map<String, MetaValue> map = initMapValues();
CompositeValue v = new CompositeValueSupport(compositeMetaType, map);
assertEquals("data should equal itself", v, v);
assertNotSame("data should not equal null", v, null);
assertNotSame("data should not equal non CompositeData", v, new Object());
CompositeValue v2 = new CompositeValueSupport(compositeMetaType, map);
assertEquals("data should equal with data2 with different instance of the same composite type", v, v2);
assertEquals("data should equal with data2 with different instance of the same composite type", v2, v);
CompositeMetaType compositeMetaType2 = initCompositeMetaType2();
v2 = new CompositeValueSupport(compositeMetaType2, map);
assertNotSame("data should not be equal with data2 with different composite type", v, v2);
assertNotSame("data2 should not be equal with data with different composite type", v2, v);