assertEquals("ejb/local2", local2.getEjbRefName());
assertEquals("local.jar#MyLocalSession1", local2.getLink());
assertEquals("A reference to MyLocalSession2", local2.getDescriptions().value()[0].value());
assertEquals(MyStatelessLocal.class, local2.getBeanInterface());
// @PostConstruct
LifecycleCallbacksMetaData postConstructs = bean.getPostConstructs();
assertNotNull(postConstructs);
assertEquals(1, postConstructs.size());
LifecycleCallbackMetaData postConstruct = postConstructs.get(0);
assertEquals("setUp", postConstruct.getMethodName());
assertEquals(MyStatefulBean.class.getName(), postConstruct.getClassName());
// @PreDestroy
LifecycleCallbacksMetaData preDestroys = bean.getPreDestroys();
assertNotNull(preDestroys);
assertEquals(1, preDestroys.size());
LifecycleCallbackMetaData preDestroy = preDestroys.get(0);
assertEquals("tearDown", preDestroy.getMethodName());
assertEquals(MyStatefulBean.class.getName(), preDestroy.getClassName());
// @Init
InitMethodsMetaData initMethods = bean.getInitMethods();
assertNotNull(initMethods);
assertEquals(1, initMethods.size());
InitMethodMetaData initMethod = initMethods.get(0);
assertEquals("init", initMethod.getBeanMethod().getMethodName());
// @PostActivate
LifecycleCallbacksMetaData postActivates = bean.getPostActivates();
assertNotNull(postActivates);
assertEquals(1, postActivates.size());
LifecycleCallbackMetaData postActivate = postActivates.get(0);
assertEquals("activate", postActivate.getMethodName());
assertEquals(MyStatefulBean.class.getName(), postActivate.getClassName());
// @PrePassivate
LifecycleCallbacksMetaData prePassivates = bean.getPrePassivates();
assertNotNull(prePassivates);
assertEquals(1, prePassivates.size());
LifecycleCallbackMetaData prePassivate = prePassivates.get(0);
assertEquals("passivate", prePassivate.getMethodName());
assertEquals(MyStatefulBean.class.getName(), prePassivate.getClassName());
// @Remove
RemoveMethodsMetaData removeMethods = bean.getRemoveMethods();
assertNotNull(removeMethods);