}
public void testInitMethods()
{
// Override
InitMethodsMetaData overrideInitMethods = new InitMethodsMetaData();
InitMethodMetaData overrideInitMethod = new InitMethodMetaData();
NamedMethodMetaData overrideNamedMethod = new NamedMethodMetaData();
overrideNamedMethod.setMethodName("overrideMethodName");
overrideInitMethod.setId("overrideId");
overrideInitMethods.add(overrideInitMethod);
JBossSessionBeanMetaData override = new JBossSessionBeanMetaData();
override.setInitMethods(overrideInitMethods);
override.setName("name");
// Original
InitMethodsMetaData originalInitMethods = new InitMethodsMetaData();
InitMethodMetaData originalInitMethod = new InitMethodMetaData();
NamedMethodMetaData originalNamedMethod = new NamedMethodMetaData();
originalNamedMethod.setMethodName("originalMethodName");
originalInitMethod.setId("originalId");
originalInitMethods.add(originalInitMethod);
JBossSessionBeanMetaData original = new JBossSessionBeanMetaData();
original.setInitMethods(originalInitMethods);
// Merged
JBossSessionBeanMetaData merged = new JBossSessionBeanMetaData();
merged.merge(override, original);
InitMethodsMetaData initMethods = merged.getInitMethods();
assertNotNull(initMethods);
InitMethodMetaData initMethod = initMethods.get(0);
assertNotNull(initMethod);
assertEquals("overrideId", initMethod.getId());
}