{
login("anil","opensource".toCharArray());
Object obj = getInitialContext().lookup("bean1.UsefulStatelessSessionBean");
obj = PortableRemoteObject.narrow(obj, UsefulStatelessSessionHome.class);
UsefulStatelessSessionHome home = (UsefulStatelessSessionHome) obj;
UsefulStatelessSession bean = home.create();
assertEquals("NiceUser is true", "true", ""+bean.isCallerInRole("NiceUser") );
assertEquals("BadRole is false", "false", ""+bean.isCallerInRole("BadRole") );
bean.remove();
logout();
}