assertTrue( ConfigurationUtil.equals( layer, ConfigurationSplitter.split( result, base ) ));
}
public void testOverrideChild() throws Exception
{
DefaultConfiguration result = new DefaultConfiguration( "a", "b" );
DefaultConfiguration rkid1 = new DefaultConfiguration( "kid1", "b" );
rkid1.setAttribute( "test", "1" );
result.addChild( rkid1 );
DefaultConfiguration base = new DefaultConfiguration( "a", "b" );
DefaultConfiguration bkid1 = new DefaultConfiguration( "kid1", "b" );
bkid1.setAttribute( "test", "0" );
base.addChild( bkid1 );
DefaultConfiguration layer = new DefaultConfiguration( "a", "b" );
DefaultConfiguration lkid1 = new DefaultConfiguration( "kid1", "b" );
lkid1.setAttribute( "test", "1" );
layer.addChild( lkid1 );
assertTrue( !ConfigurationUtil.equals( result, ConfigurationMerger.merge( layer, base ) ) );
lkid1.setAttribute( "excalibur-configuration:merge", "true" );
assertTrue( ConfigurationUtil.equals( result, ConfigurationMerger.merge( layer, base ) ) );
assertTrue( ConfigurationUtil.equals( layer, ConfigurationSplitter.split( result, base ) ) );
}