public static Stream<Arguments> getAuditParameters() throws Throwable {
        val context = MockRequestContext.create();
        val authentication = RegisteredServiceTestUtils.getAuthentication(UUID.randomUUID().toString());
        WebUtils.putAuthentication(authentication, context);

        val credentials = RegisteredServiceTestUtils.getCredentialsWithSameUsernameAndPassword(UUID.randomUUID().toString());
        val transaction = CoreAuthenticationTestUtils.getAuthenticationTransactionFactory().newTransaction(credentials);
        val authenticationResult = CoreAuthenticationTestUtils.getAuthenticationResult(authentication);

        val ticketGrantingTicket = new TicketGrantingTicketImpl(UUID.randomUUID().toString(), authentication, NeverExpiresExpirationPolicy.INSTANCE);
        val sloRequest = SingleLogoutExecutionRequest.builder()
            .ticketGrantingTicket(ticketGrantingTicket)
            .build();

        val auditableContext = AuditableContext.builder()
            .authentication(authentication)
            .authenticationResult(authenticationResult)
            .build();

        val assertion = mock(Assertion.class);
        when(assertion.getPrimaryAuthentication()).thenReturn(authentication);

        val auditableEntity = mock(AuditableEntity.class);
        when(auditableEntity.getAuditablePrincipal()).thenReturn(authentication.getPrincipal().getId());

        val httpRequest = new MockHttpServletRequest();
        httpRequest.setAttribute(Principal.class.getName(), authentication.getPrincipal());
        
        return Stream.of(
            arguments(context, null),
            arguments(sloRequest, null),
            arguments(transaction, null),
            arguments(credentials, null),
            arguments(authenticationResult, null),
            arguments(auditableContext, null),
            arguments(authentication, null),
            arguments(assertion, null),
            arguments(auditableEntity, null),
            arguments(httpRequest, null)
        );
    }
This is {@link DefaultAuditPrincipalResolverTests}.

@author Misagh Moayyed
@since 7.0.0
core/cas-server-core-audit/src/test/java/org/apereo/cas/audit/spi/principal/DefaultAuditPrincipalResolverTests.java