@Test
    void verifyAction() {
        assertEquals(Credential.UNKNOWN_ID, surrogateAuditPrincipalIdProvider.getPrincipalIdFrom(null, null, null, null));

        val auth = CoreAuthenticationTestUtils.getAuthentication(
            CoreAuthenticationTestUtils.getPrincipal(),
            CollectionUtils.wrap(SurrogateAuthenticationService.AUTHENTICATION_ATTR_SURROGATE_ENABLED, List.of("true"),
                SurrogateAuthenticationService.AUTHENTICATION_ATTR_SURROGATE_PRINCIPAL, List.of("principal"),
                SurrogateAuthenticationService.AUTHENTICATION_ATTR_SURROGATE_USER, List.of("surrogateUser")));
        assertTrue(surrogateAuditPrincipalIdProvider.supports(mock(JoinPoint.class), auth,
            new Object(), new SurrogateAuthenticationException("error")));
        assertNotNull(surrogateAuditPrincipalIdProvider.getPrincipalIdFrom(mock(JoinPoint.class), auth,
            new Object(), new SurrogateAuthenticationException("error")));
    }
This is {@link SurrogateAuditPrincipalIdProviderTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-surrogate-authentication/src/test/java/org/apereo/cas/authentication/audit/SurrogateAuditPrincipalIdProviderTests.java