private void setAuthnRequestFor(final JEEContext webContext,
                                    final String... allowedIdps) throws Exception {
        val service = getSamlRegisteredServiceFor("https://cassp.example.org");
        service.setId(RandomUtils.nextInt());

        val authnRequest = SamlIdPTestUtils.getAuthnRequest(openSamlConfigBean, service);

        var builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory()
            .getBuilder(Scoping.DEFAULT_ELEMENT_NAME);
        val scoping = (Scoping) builder.buildObject(Scoping.DEFAULT_ELEMENT_NAME);

        builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory()
            .getBuilder(IDPList.DEFAULT_ELEMENT_NAME);
        val idpList = (IDPList) builder.buildObject(IDPList.DEFAULT_ELEMENT_NAME);

        Arrays.stream(allowedIdps).forEach(idp -> {
            val idpEntry = (IDPEntry) openSamlConfigBean.getBuilderFactory()
                .getBuilder(IDPEntry.DEFAULT_ELEMENT_NAME).buildObject(IDPEntry.DEFAULT_ELEMENT_NAME);
            idpEntry.setProviderID(idp);
            idpList.getIDPEntrys().add(idpEntry);
        });
        scoping.setIDPList(idpList);
        authnRequest.setScoping(scoping);

        builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory()
            .getBuilder(RequestedAuthnContext.DEFAULT_ELEMENT_NAME);
        val authnContext = (RequestedAuthnContext) builder.buildObject(RequestedAuthnContext.DEFAULT_ELEMENT_NAME);
        authnContext.setComparison(AuthnContextComparisonTypeEnumeration.EXACT);

        builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory()
            .getBuilder(AuthnContextClassRef.DEFAULT_ELEMENT_NAME);
        val classRef = (AuthnContextClassRef) builder.buildObject(AuthnContextClassRef.DEFAULT_ELEMENT_NAME);
        classRef.setURI(UUID.randomUUID().toString());
        authnContext.getAuthnContextClassRefs().add(classRef);

        authnRequest.setRequestedAuthnContext(authnContext);

        authnRequest.setIsPassive(Boolean.TRUE);
        authnRequest.setForceAuthn(Boolean.TRUE);

        storeRequest(authnRequest, webContext);
    }
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