Collection<Class<?>> classes = PackageScanner.loadClasses();
ApplicationClient5MetaDataCreator creator = new ApplicationClient5MetaDataCreator(finder, classMainName);
ApplicationClient5MetaData clientMD = creator.create(classes);
assertEquals(3, clientMD.getAnnotatedEjbReferences().size());
AnnotatedEJBReferenceMetaData resourceMethodBean = clientMD.getAnnotatedEjbReferences().get(classMainName + "/resourceMethodBean");
assertNotNull(resourceMethodBean);
assertEquals(ResourceIF.class, resourceMethodBean.getBeanInterface());
assertEquals("ResourceOnMethodBean", resourceMethodBean.getLink());
Set<ResourceInjectionTargetMetaData> resourceMethodBeanTargets = resourceMethodBean.getInjectionTargets();
assertNotNull(resourceMethodBeanTargets);
assertEquals(1, resourceMethodBeanTargets.size());
ResourceInjectionTargetMetaData method = resourceMethodBeanTargets.iterator().next();
assertEquals(Client.class.getName(), method.getInjectionTargetClass());
assertEquals("setResourceMethodBean", method.getInjectionTargetName());
AnnotatedEJBReferenceMetaData resourceFieldBean = clientMD.getAnnotatedEjbReferences().get(classMainName + "/resourceFieldBean");
assertNotNull(resourceFieldBean);
assertEquals("ResourceOnFieldBean", resourceFieldBean.getLink());
Set<ResourceInjectionTargetMetaData> resourceFieldBeanTargets = resourceFieldBean.getInjectionTargets();
assertNotNull(resourceFieldBeanTargets);
assertEquals(1, resourceFieldBeanTargets.size());
ResourceInjectionTargetMetaData field = resourceFieldBeanTargets.iterator().next();
assertEquals(Client.class.getName(), field.getInjectionTargetClass());
assertEquals("resourceFieldBean", field.getInjectionTargetName());
AnnotatedEJBReferenceMetaData resourceClassBean = clientMD.getAnnotatedEjbReferences().get("ejb/resourceClassBean");
assertNotNull(resourceClassBean);
assertEquals("ResourcesOnClassBean", resourceClassBean.getLink());
assertEquals("refs/resources/ResourcesOnClassBean", resourceClassBean.getMappedName());
assertEquals("refs/resources/ResourcesOnClassBean", resourceClassBean.getJndiName());
// jms Queue maps to message-destination-refs
MessageDestinationReferencesMetaData msgRefs = clientMD.getMessageDestinationReferences();
assertNotNull(msgRefs);
MessageDestinationReferenceMetaData sendQueue = clientMD.getMessageDestinationReferenceByName("sendQueue");