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

        WebUtils.putAuthentication(CoreAuthenticationTestUtils.getAuthentication(), context);
        val service = RegisteredServiceTestUtils.getService("https://aup.service.disabled");
        val registeredService = RegisteredServiceTestUtils.getRegisteredService(service.getId(), Map.of());
        val policy = new DefaultRegisteredServiceAcceptableUsagePolicy();
        policy.setEnabled(false);
        registeredService.setAcceptableUsagePolicy(policy);
        servicesManager.save(registeredService);

        WebUtils.putRegisteredService(context, registeredService);
        WebUtils.putServiceIntoFlowScope(context, service);

        assertNull(acceptableUsagePolicyVerifyAction.execute(context));
    }
This is {@link AcceptableUsagePolicyVerifyServiceActionTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-aup-webflow/src/test/java/org/apereo/cas/web/flow/AcceptableUsagePolicyVerifyServiceActionTests.java