@Test
        void verifyAuthorizationByTenant() throws Throwable {
            val requestContext = MockRequestContext.create(applicationContext);
            requestContext.setContextPath("/tenants/shire/login");
            val request = requestContext.getHttpServletRequest();

            val webContext = new JEEContext(requestContext.getHttpServletRequest(), requestContext.getHttpServletResponse());

            var client = identityProviders.findClient("CasClient", webContext).orElseThrow();
            val service = RegisteredServiceTestUtils.getService(UUID.randomUUID().toString());
            val registeredService = RegisteredServiceTestUtils.getRegisteredService(service.getId(), Map.of());
            servicesManager.save(registeredService);
            assertTrue(delegatedClientIdentityProviderAuthorizer.isDelegatedClientAuthorizedForService(client, service, request));

            client = identityProviders.findClient("LogoutClient", webContext).orElseThrow();
            assertFalse(delegatedClientIdentityProviderAuthorizer.isDelegatedClientAuthorizedForService(client, service, request));
        }
This is {@link DefaultDelegatedClientIdentityProviderAuthorizerTests}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-pac4j-webflow/src/test/java/org/apereo/cas/web/flow/authz/DefaultDelegatedClientIdentityProviderAuthorizerTests.java