@Test
    void verifyNominate() throws Throwable {
        val credential = new BasicIdentifiableCredential();
        credential.getCredentialMetadata()
            .addTrait(new SurrogateCredentialTrait("cas-surrogate"));
        val surrogate = buildSurrogatePrincipal(credential,
            CoreAuthenticationTestUtils.getAuthentication("casuser")
        );

        val strategy = new SurrogatePrincipalElectionStrategy();
        val result = strategy.nominate(CollectionUtils.wrapList(CoreAuthenticationTestUtils.getPrincipal("two"), surrogate),
            CoreAuthenticationTestUtils.getAttributes());
        assertEquals(result, surrogate);
    }
This is {@link SurrogatePrincipalElectionStrategyTests}.

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