ejbResource.setEjbName("TestEJB");
ejbResource.setEjbMethod(DummyClass.class.getMethod("someMethod", new Class[0]));
ejbResource.setEjbMethodInterface("void someMethod");
ejbResource.setEjbMethodRoles(SecurityTestUtil.getRoleGroup(new String[]{"roleA", "roleC"}));
AuthorizationContext ac = new JBossAuthorizationContext("test",
new AppCallbackHandler("a","b".toCharArray()));
try
{
ac.authorize(ejbResource, new Subject(), principalRole);
fail("Should have failed");
}
catch(AuthorizationException ignore)
{
}