PreAuthContext implements LoginContext { @Override public void logout() { } PreAuthContext(Subject subject); @Override Subject getSubject(); @Override void login(); @Override void logout();  }
@Test public void testLogout() { ctx.logout(); assertSame(subject, ctx.getSubject()); }