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

        WebUtils.putAuthentication(CoreAuthenticationTestUtils.getAuthentication(), context);

        val id = UUID.randomUUID().toString();
        val registeredService = RegisteredServiceTestUtils.getRegisteredService(id);
        val attrPolicy = new ReturnAllAttributeReleasePolicy();
        attrPolicy.setConsentPolicy(new DefaultRegisteredServiceConsentPolicy());
        registeredService.setAttributeReleasePolicy(attrPolicy);
        servicesManager.save(registeredService);

        WebUtils.putServiceIntoFlowScope(context, CoreAuthenticationTestUtils.getWebApplicationService(registeredService.getServiceId()));
        assertEquals(CheckConsentRequiredAction.EVENT_ID_CONSENT_REQUIRED, checkConsentRequiredAction.execute(context).getId());
        val flowScope = context.getFlowScope();
        assertTrue(flowScope.contains("attributes"));
        assertTrue(flowScope.contains("principal"));
        assertTrue(flowScope.contains("service"));
        assertTrue(flowScope.contains("option"));
        assertTrue(flowScope.contains("reminder"));
        assertTrue(flowScope.contains("reminderTimeUnit"));
    }
This is {@link CheckConsentRequiredActionTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-consent-webflow/src/test/java/org/apereo/cas/web/flow/CheckConsentRequiredActionTests.java