@Test
    void verifyMultiPrincipalsWithoutSurrogate() throws Throwable {
        val strategy = new SurrogatePrincipalElectionStrategy();
        val attributes1 = CollectionUtils.<String, List<Object>>wrap(
            "name", CollectionUtils.wrapList("cas"),
            "lastname", CollectionUtils.wrapList("apereo"));
        val attributes2 = CollectionUtils.<String, List<Object>>wrap(
            "color", CollectionUtils.wrapList("blue"),
            "city", CollectionUtils.wrapList("london"));

        val primaryPrincipal1 = CoreAuthenticationTestUtils.getPrincipal("primary", attributes1);
        val primaryPrincipal2 = CoreAuthenticationTestUtils.getPrincipal("primary", attributes2);
        val principalAttributes = CoreAuthenticationUtils.mergeAttributes(attributes1, attributes2);
        val principal = strategy.nominate(List.of(
            RegisteredServiceTestUtils.getAuthentication(primaryPrincipal1),
            RegisteredServiceTestUtils.getAuthentication(primaryPrincipal2)), principalAttributes);
        assertNotNull(principal);
        assertEquals(principalAttributes, principal.getAttributes());
    }
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