NegotiateAuthenticationRealm extends AuthenticatingRealm { @Override public boolean supports(final AuthenticationToken token) { return token instanceof NegotiateToken; } NegotiateAuthenticationRealm(); @Override boolean supports(final AuthenticationToken token);  }
@Test void testSupports() { Assertions.assertFalse(this.negAuthRealm.supports(this.authenticationToken), "Non-NegotiateToken should not be supported."); Assertions .assertTrue(this.negAuthRealm.supports(new NegotiateToken(null, null, null, null, false, false, null))); }