@Test
    void verifyPolicyFailsUserFoundOnce() throws Throwable {
        val authentication = CoreAuthenticationTestUtils.getAuthentication(UUID.randomUUID().toString());
        val ticket = new TicketGrantingTicketImpl(UUID.randomUUID().toString(),
            authentication, NeverExpiresExpirationPolicy.INSTANCE);
        ticketRegistry.addTicket(ticket);
        assertThrows(UniquePrincipalRequiredException.class,
            () -> uniqueAuthenticationPolicy.isSatisfiedBy(authentication, applicationContext));
    }
This is {@link UniquePrincipalAuthenticationPolicyTests}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-authentication/src/test/java/org/apereo/cas/authentication/policy/UniquePrincipalAuthenticationPolicyTests.java