}
public void testResourceManagers() throws Exception
{
JBoss50MetaData original = new JBoss50MetaData();
ResourceManagersMetaData rms = new ResourceManagersMetaData();
original.setResourceManagers(rms);
ResourceManagerMetaData rm = new ResourceManagerMetaData();
rm.setResName("original1");
rms.add(rm);
rm = new ResourceManagerMetaData();
rm.setResName("original2");
rms.add(rm);
JBoss50MetaData override = new JBoss50MetaData();
rms = new ResourceManagersMetaData();
override.setResourceManagers(rms);
rm = new ResourceManagerMetaData();
rm.setResName("override1");
rms.add(rm);
rm = new ResourceManagerMetaData();
rm.setResName("override2");
rms.add(rm);
JBoss50MetaData merged = new JBoss50MetaData();
merged.merge(override, original);
rms = merged.getResourceManagers();
assertNotNull(rms);
assertEquals(4, rms.size());System.out.println("rms: " + rms.keySet());
assertTrue(rms.containsKey("original1"));
assertTrue(rms.containsKey("original2"));
assertTrue(rms.containsKey("override1"));
assertTrue(rms.containsKey("override2"));
}