@Test public void logout() throws LoginException { when(userDao.getByUsername(eq(TEST_USERNAME))).thenReturn(testUser); PLCLoginModule testLoginModule = invokeLogin(TEST_USERNAME, TEST_PASSWORD); assertTrue(subject.getPrincipals().contains(new UserRole("plcuser"))); assertTrue(subject.getPrincipals().contains(new UserPrincipal(testUser))); testLoginModule.logout(); assertFalse(subject.getPrincipals().contains(new UserRole("plcuser"))); assertFalse(subject.getPrincipals().contains(new UserPrincipal(testUser))); }
@Override public boolean logout() throws LoginException { LOG.debug("logout"); subject.getPrincipals().clear(); return true; }
PLCLoginModule implements LoginModule { @Override public boolean logout() throws LoginException { LOG.debug("logout"); subject.getPrincipals().clear(); return true; } }
PLCLoginModule implements LoginModule { @Override public boolean logout() throws LoginException { LOG.debug("logout"); subject.getPrincipals().clear(); return true; }  }
PLCLoginModule implements LoginModule { @Override public boolean logout() throws LoginException { LOG.debug("logout"); subject.getPrincipals().clear(); return true; }  @Override boolean abort(); @Override boolean commit(); @Override void initialize(Subject aSubject, CallbackHandler cbHandler, Map<String, ?> sharedState,
            Map<String, ?> opts); @SuppressWarnings("PMD.PreserveStackTrace") @Override boolean login(); @Override boolean logout(); }
PLCLoginModule implements LoginModule { @Override public boolean logout() throws LoginException { LOG.debug("logout"); subject.getPrincipals().clear(); return true; }  @Override boolean abort(); @Override boolean commit(); @Override void initialize(Subject aSubject, CallbackHandler cbHandler, Map<String, ?> sharedState,
            Map<String, ?> opts); @SuppressWarnings("PMD.PreserveStackTrace") @Override boolean login(); @Override boolean logout();  }