@SuppressWarnings("unchecked")
public void testJavaEERunAsIdentity() throws Exception
{
JBossSecurityContext sc = new JBossSecurityContext("conf-javaee");
sc.setIncomingRunAs(new RunAsIdentity("theduke", "jduke"));
assertNotNull("SecurityContext is not null", sc);
IdentityTrustManager itm = sc.getIdentityTrustManager();
assertNotNull("IdentityTrustManager is not null", itm);
assertEquals("Is Trusted", TrustDecision.Permit, itm.isTrusted(sc));