@Test
    void verifyOperation() throws Throwable {
        val surrogatePrincipalBuilder = getBuilder();
        val primary = CoreAuthenticationTestUtils.getPrincipal();
        val surrogate = new BasicIdentifiableCredential();
        surrogate.getCredentialMetadata()
            .addTrait(new SurrogateCredentialTrait("surrogate"));
        val principal = surrogatePrincipalBuilder.buildSurrogatePrincipal(surrogate, primary);
        assertEquals(0, surrogateMultifactorAuthenticationPrincipalResolver.getOrder());
        assertTrue(surrogateMultifactorAuthenticationPrincipalResolver.supports(principal));
        val resolved = surrogateMultifactorAuthenticationPrincipalResolver.resolve(principal);
        assertEquals(primary, resolved);
    }
This is {@link MultifactorAuthenticationPrincipalResolverTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-surrogate-authentication/src/test/java/org/apereo/cas/authentication/MultifactorAuthenticationPrincipalResolverTests.java