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

        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        val webContext = new JEEContext(request, response);
        val webApplicationService = CoreAuthenticationTestUtils.getWebApplicationService(UUID.randomUUID().toString());

        assertDoesNotThrow(() -> customizer.customize(saml2Client, webContext));
        
        assertTrue(customizer.isAuthorized(webContext, saml2Client, webApplicationService));

        setAuthnRequestFor(webContext);
        assertTrue(customizer.isAuthorized(webContext, saml2Client, webApplicationService));

        setAuthnRequestFor(webContext, UUID.randomUUID().toString());
        assertFalse(customizer.isAuthorized(webContext, saml2Client, webApplicationService));

        
        setAuthnRequestFor(webContext, saml2Client.getIdentityProviderResolvedEntityId());
        assertTrue(customizer.isAuthorized(webContext, saml2Client, webApplicationService));
        assertDoesNotThrow(() -> customizer.customize(saml2Client, webContext));
        assertTrue(customizer.isAuthorized(webContext, new FormClient(), 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