{EjbLink2Bean.class, EjbLink3Bean.class};
List<Class<?>> classes = Arrays.asList(beanClasses);
AnnotationFinder<AnnotatedElement> finder = new DefaultAnnotationFinder<AnnotatedElement>();
EjbJar30Creator creator = new EjbJar30Creator(finder);
EjbJar30MetaData metaData = creator.create(classes);
EjbJar3xMetaData specMetaData = unmarshal(EjbJar3xMetaData.class);
EjbJar3xMetaData merged = new EjbJar30MetaData();
AnnotationMergedView.merge(merged, specMetaData, metaData);
JBossMetaData jbossMetaData = unmarshal("AnnotationEjb3_testAnnotationMergedViewWithPartialXml-jboss.xml",
JBossMetaData.class, null);
// Create a merged view
JBossMetaData jbossMergedMetaData = new JBossMetaData();
jbossMergedMetaData.merge(jbossMetaData, merged);
EnterpriseBeanMetaData bean2 = merged.getEnterpriseBean("EjbLink2Bean");
assertNotNull(bean2);
EJBReferenceMetaData ref1 = bean2.getEjbReferenceByName("ejb/EjbLink1Bean");
assertNotNull(ref1);
EJBLocalReferenceMetaData ref3 = bean2.getEjbLocalReferenceByName("ejb/EjbLink3Bean");
assertNotNull(ref3);
EnterpriseBeanMetaData bean3 = merged.getEnterpriseBean("EjbLink3Bean");
assertNotNull(bean3);
JBossEnterpriseBeanMetaData jbean2 = jbossMergedMetaData.getEnterpriseBean("EjbLink2Bean");
assertNotNull(jbean2);
JBossEnterpriseBeanMetaData jbean3 = jbossMergedMetaData.getEnterpriseBean("EjbLink3Bean");