@Test
    void verifyScopedIdentityProviderPerService() throws Throwable {
        val saml2Client = buildMockSaml2Client();

        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        val webContext = new JEEContext(request, response);

        val webApplicationService = RegisteredServiceTestUtils.getService(UUID.randomUUID().toString());

        val registeredService = RegisteredServiceTestUtils.getRegisteredService(webApplicationService.getId());
        val delegatedAuthenticationPolicy = new DefaultRegisteredServiceDelegatedAuthenticationPolicy();
        delegatedAuthenticationPolicy.setAllowedProviders(List.of(saml2Client.getName()));
        val accessStrategy = new DefaultRegisteredServiceAccessStrategy().setDelegatedAuthenticationPolicy(delegatedAuthenticationPolicy);
        registeredService.setAccessStrategy(accessStrategy);
        servicesManager.save(registeredService);

        setAuthnRequestFor(webContext, saml2Client.getIdentityProviderResolvedEntityId());
        assertTrue(customizer.isAuthorized(webContext, saml2Client, webApplicationService));
    }
This is {@link SamlIdPDelegatedClientAuthenticationRequestCustomizerTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/web/idp/delegation/SamlIdPDelegatedClientAuthenticationRequestCustomizerTests.java