@Test
    void verifyIdPNeedsConsentOperation() throws Throwable {
        val context = MockRequestContext.create(applicationContext);

        val principal = RegisteredServiceTestUtils.getPrincipal("casuser", CollectionUtils.wrap("uid", "CAS-System"));
        val authn = RegisteredServiceTestUtils.getAuthentication(principal);
        val cookie = new MockTicketGrantingTicket(authn);
        val issuer = UUID.randomUUID().toString();

        val registeredService = SamlIdPTestUtils.getSamlRegisteredService(issuer);
        registeredService.setAttributeReleasePolicy(new ReturnAllowedAttributeReleasePolicy(List.of("uid")));
        val service = RegisteredServiceTestUtils.getService(issuer);

        val authnRequest = getAuthnRequestFor(issuer);
        val ssoRequest = SingleSignOnParticipationRequest.builder()
            .httpServletRequest(context.getHttpServletRequest())
            .httpServletResponse(context.getHttpServletResponse())
            .requestContext(context)
            .build()
            .attribute(AuthnRequest.class.getName(), authnRequest)
            .attribute(Issuer.class.getName(), issuer)
            .attribute(Service.class.getName(), service)
            .attribute(RegisteredService.class.getName(), registeredService)
            .attribute(Authentication.class.getName(), authn)
            .attribute(TicketGrantingTicket.class.getName(), cookie);
        assertFalse(singleSignOnParticipationStrategy.isParticipating(ssoRequest));
    }
This is {@link SamlIdPConsentSingleSignOnParticipationStrategyTests}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/web/flow/SamlIdPConsentSingleSignOnParticipationStrategyTests.java