filter.commitToContainer(new MockHttpServletRequest(principal, null), principal);
    public void testCorrectOperation() {        PrincipalAcegiUserToken principal = new PrincipalAcegiUserToken("key",                "someone", "password",                new GrantedAuthority[] {new GrantedAuthorityImpl("SOME_ROLE")});        JbossIntegrationFilter filter = new MockJbossIntegrationFilter(new MockInitialContext(                    makeIntoSubject(principal)));        Object result = filter.extractFromContainer(new MockHttpServletRequest(                    null, null));        if (!(result instanceof PrincipalAcegiUserToken)) {            fail("Should have returned PrincipalAcegiUserToken");        }        PrincipalAcegiUserToken castResult = (PrincipalAcegiUserToken) result;        assertEquals(principal, result);    }