private Principal buildSurrogatePrincipal(final Credential surrogateId, final Authentication primaryAuth) throws Throwable {
        val surrogatePrincipalBuilder = getBuilder();
        return surrogatePrincipalBuilder.buildSurrogatePrincipal(surrogateId,
            primaryAuth.getPrincipal(),
            RegisteredServiceTestUtils.getRegisteredService());
    }
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