private static Assertion getAssertion(final Map<Credential, ? extends AuthenticationHandler> handlers) {
        val assertion = mock(Assertion.class);
        val principal = CoreAuthenticationTestUtils.getPrincipal("casuser");
        val authentication = CoreAuthenticationTestUtils.getAuthenticationBuilder(principal, handlers,
            Map.of(AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS,
                handlers.values().stream().map(AuthenticationHandler::getName).collect(Collectors.toList()))).build();
        when(assertion.getPrimaryAuthentication()).thenReturn(authentication);
        return assertion;
    }
This is {@link AuthenticationPolicyAwareServiceTicketValidationAuthorizerTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-validation/src/test/java/org/apereo/cas/validation/AuthenticationPolicyAwareServiceTicketValidationAuthorizerTests.java