}
private void assertEnv(EnvironmentRefsGroupMetaData env) throws Exception
{
// @EJB
AnnotatedEJBReferencesMetaData ejbRefs = env.getAnnotatedEjbReferences();
assertEquals(4, ejbRefs.size());
AnnotatedEJBReferenceMetaData injectedField = ejbRefs.get(MyServlet.class.getName() + "/injectedField");
assertNotNull(injectedField);
assertEquals(MyStatelessLocal.class, injectedField.getBeanInterface());
AnnotatedEJBReferenceMetaData injectedFieldWithOverridenName = ejbRefs.get("overrideName");
assertNotNull(injectedFieldWithOverridenName);
assertEquals(MyStatelessLocal.class, injectedFieldWithOverridenName.getBeanInterface());
AnnotatedEJBReferenceMetaData local1 = ejbRefs.get("ejb/local1");
assertNotNull(local1);
assertEquals("java:/MyLocalSession1", local1.getMappedName());
assertEquals("ejb/local1", local1.getEjbRefName());
assertEquals("MyLocalSession1", local1.getLink());
assertEquals("A reference to MyLocalSession1", local1.getDescriptions().value()[0].value());
assertEquals(MyStatelessLocal.class, local1.getBeanInterface());
AnnotatedEJBReferenceMetaData local2 = ejbRefs.get("ejb/local2");
assertNotNull(local2);
assertEquals("java:/MyLocalSession2", local2.getMappedName());
assertEquals("ejb/local2", local2.getEjbRefName());
assertEquals("local.jar#MyLocalSession1", local2.getLink());
assertEquals("A reference to MyLocalSession2", local2.getDescriptions().value()[0].value());