// login with a user that has the Guest role.
this.login("UserC", "PassC".toCharArray());
// get a reference to the remote protected stateless session bean.
Object obj = getInitialContext().lookup("SimpleStatelessSessionBean/remote");
SimpleSession session = (SimpleSession) PortableRemoteObject.narrow(obj, SimpleSession.class);
// a guest user should have access to unprotected methods only.
this.assertMethodAccessResults(session, false, false);
// repeat the tests, this time calling a stateful session bean.