assertFalse("unnecessary logout", mockLoginModule.logoutCalled);
assertTrue(SecurityHelper.isUserAuthenticated(support.request));
}
public void testSuccessfulLoginWhenAlreadyLoggedIn() throws Exception {
Person person = new Person("foo");
support.hibernateSession.find2Return = new ArrayList();
support.hibernateSession.find2Return.add(person);
MockLoginModule mockLoginModule = (MockLoginModule)authenticator.getLoginModule();
assertNotNull(mockLoginModule);
mockLoginModule.authenticateReturn = new Subject();