}
@Test
public void test1() throws Exception
{
SecuredLocal bean = lookup("SecuredBean/local", SecuredLocal.class);
SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
SecurityContextAssociation.setSecurityContext(sc);
assertEquals("nobody", bean.whoAmI());
try
{
bean.onlyAdmin();
fail("Should have thrown EJBAccessException");
}
catch(EJBAccessException e)
{
// good