public void testAnonymous() throws Exception
{
SecurityContext sc = SecurityContextFactory.createSecurityContext("test");
SecurityContextAssociation.setSecurityContext(sc);
SecuredGreeter21RemoteHome home = lookup("SecuredGreeter21Bean/home", SecuredGreeter21RemoteHome.class);
SecuredGreeter21Remote bean = home.create("testAnonymous");
String result = bean.sayHi();
assertEquals("Hi testAnonymous (anonymous)", result);
}