private static Assertion getAssertion() {
        val assertion = mock(Assertion.class);
        val principal = CoreAuthenticationTestUtils.getPrincipal("casuser");
        val handlers = (Map) Map.of(new UsernamePasswordCredential(), new SimpleTestUsernamePasswordAuthenticationHandler());
        val authentication = CoreAuthenticationTestUtils.getAuthenticationBuilder(principal, handlers, Map.of()).build();
        when(assertion.getPrimaryAuthentication()).thenReturn(authentication);
        when(assertion.getChainedAuthentications()).thenReturn(List.of(authentication));
        return assertion;
    }
This is {@link ChainingCasProtocolValidationSpecificationTests}.

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