private static TicketValidationResult getValidationResult(final Map<String, List<Object>> attributes) throws Throwable {
        val principal = PrincipalFactoryUtils.newPrincipalFactory().createPrincipal("casuser", attributes);
        val assertion = mock(TicketValidationResult.class);
        when(assertion.getPrincipal()).thenReturn(principal);
        return assertion;
    }
This is {@link DefaultRelyingPartyTokenProducerTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-ws-idp/src/test/java/org/apereo/cas/ws/idp/services/DefaultRelyingPartyTokenProducerTests.java