assertEquals("4.0", jbossWeb.getVersion());
assertEquals("java:/jaas/jbosstest-web", jbossWeb.getSecurityDomain());
assertEquals(5, jbossWeb.getResourceReferences().size());
// jdbc/DefaultDS
ResourceReferenceMetaData dsRef = jbossWeb.getResourceReferenceByName("jdbc/DefaultDS");
assertEquals("jdbc/DefaultDS", dsRef.getResourceRefName());
assertEquals("The default DS", dsRef.getDescriptions().value()[0].value());
assertEquals("java:/DefaultDS", dsRef.getMappedName());
assertEquals("javax.sql.DataSource", dsRef.getType());
assertEquals(ResourceAuthorityType.Container, dsRef.getResAuth());
// mail/DefaultMail
ResourceReferenceMetaData mailRef = jbossWeb.getResourceReferenceByName("mail/DefaultMail");
assertEquals("mail/DefaultMail", mailRef.getResourceRefName());
assertEquals("Default Mail", mailRef.getDescriptions().value()[0].value());
assertEquals("java:/Mail", mailRef.getMappedName());
assertEquals("javax.mail.Session", mailRef.getType());
assertEquals(ResourceAuthorityType.Container, mailRef.getResAuth());
// url/JBossHome
ResourceReferenceMetaData jbossUrlRef = jbossWeb.getResourceReferenceByName("url/JBossHome");
assertEquals("url/JBossHome", jbossUrlRef.getResourceRefName());
assertEquals("JBoss Home Page", jbossUrlRef.getDescriptions().value()[0].value());
assertEquals("http://www.jboss.org", jbossUrlRef.getResUrl());
assertEquals("java.net.URL", jbossUrlRef.getType());
assertEquals(ResourceAuthorityType.Container, jbossUrlRef.getResAuth());
// url/IndirectURL
ResourceReferenceMetaData indirectUrlRef = jbossWeb.getResourceReferenceByName("url/IndirectURL");
assertEquals("url/IndirectURL", indirectUrlRef.getResourceRefName());
assertEquals("SomeWebSite HomePage", indirectUrlRef.getDescriptions().value()[0].value());
assertEquals("java:SomeWebSite", indirectUrlRef.getMappedName());
assertEquals("java.net.URL", indirectUrlRef.getType());
assertEquals(ResourceAuthorityType.Container, indirectUrlRef.getResAuth());
assertEquals(2, jbossWeb.getResourceEnvironmentReferences().size());
ResourceEnvironmentReferenceMetaData resenv1 = jbossWeb.getResourceEnvironmentReferenceByName("res1/aQueue");
assertEquals("resenv1", resenv1.getId());
assertEquals("res1/aQueue", resenv1.getResourceEnvRefName());