private static void authenticate(final SpnegoCredential credentials, final JcifsSpnegoAuthenticationHandler authenticationHandler) {
        try {
            authenticationHandler.authenticate(credentials, mock(Service.class));
            throw new AssertionError("An AbstractAuthenticationException should have been thrown");
        } catch (final Throwable e) {
            assertNull(credentials.getNextToken());
            assertNull(credentials.getPrincipal());
        }
    }
@author Marc-Antoine Garrigue
@author Arnaud Lesueur
@since 4.2.0
support/cas-server-support-spnego/src/test/java/org/apereo/cas/support/spnego/authentication/handler/support/JcifsSpnegoAuthenticationHandlerTests.java