@Test
    void verifyOperation() throws Throwable {
        val service = getSamlRegisteredServiceFor("https://cassp.example.org");
        service.setId(2000);
        val authnRequest = SamlIdPTestUtils.getAuthnRequest(openSamlConfigBean, service);
        authnRequest.setForceAuthn(true);
        authnRequest.setIsPassive(true);

        var builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory()
            .getBuilder(AuthnContextClassRef.DEFAULT_ELEMENT_NAME);
        val classRef = (AuthnContextClassRef) builder.buildObject(AuthnContextClassRef.DEFAULT_ELEMENT_NAME);
        classRef.setURI("https://refeds.org/profile/mfa");

        builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory()
            .getBuilder(RequestedAuthnContext.DEFAULT_ELEMENT_NAME);
        val reqCtx = (RequestedAuthnContext) builder.buildObject(RequestedAuthnContext.DEFAULT_ELEMENT_NAME);
        reqCtx.setComparison(AuthnContextComparisonTypeEnumeration.EXACT);
        reqCtx.getAuthnContextClassRefs().add(classRef);

        authnRequest.setRequestedAuthnContext(reqCtx);

        val request = new MockHttpServletRequest();
        request.addParameter(SamlIdPConstants.AUTHN_REQUEST_ID, authnRequest.getID());

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

        val messageContext = new MessageContext();
        messageContext.setMessage(authnRequest);
        val context = Pair.of(authnRequest, messageContext);
        SamlIdPSessionManager.of(openSamlConfigBean, samlIdPDistributedSessionStore).store(webContext, context);

        val saml2Client = mock(SAML2Client.class);
        assertTrue(customizer.supports(saml2Client, webContext));
        customizer.customize(saml2Client, webContext);
        assertTrue(webContext.getRequestAttribute(RedirectionActionBuilder.ATTRIBUTE_FORCE_AUTHN).isPresent());
        assertTrue(webContext.getRequestAttribute(RedirectionActionBuilder.ATTRIBUTE_PASSIVE).isPresent());
        assertTrue(webContext.getRequestAttribute(SAML2ConfigurationContext.REQUEST_ATTR_AUTHN_CONTEXT_CLASS_REFS).isPresent());
        assertTrue(webContext.getRequestAttribute(SAML2ConfigurationContext.REQUEST_ATTR_COMPARISON_TYPE).isPresent());
    }
This is {@link SamlIdPDelegatedAuthenticationConfigurationTests}.

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