@Test
    void verifyValidCredentials() throws Throwable {
        spnegoCredentials.setPrincipal(PrincipalFactoryUtils.newPrincipalFactory().createPrincipal("test"));
        assertEquals("test", this.resolver.resolve(this.spnegoCredentials,
            Optional.of(CoreAuthenticationTestUtils.getPrincipal()),
            Optional.of(new SimpleTestUsernamePasswordAuthenticationHandler()),
            Optional.of(CoreAuthenticationTestUtils.getService())).getId());
    }
@author Marc-Antoine Garrigue
@author Arnaud Lesueur
@since 3.1
support/cas-server-support-spnego/src/test/java/org/apereo/cas/support/spnego/authentication/principal/SpnegoCredentialsToPrincipalResolverTests.java