@Test
    void verifyOperation() throws Exception {
        var builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory()
            .getBuilder(LogoutRequest.DEFAULT_ELEMENT_NAME);
        val logoutRequest = (LogoutRequest) builder.buildObject();

        builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory()
            .getBuilder(Issuer.DEFAULT_ELEMENT_NAME);
        val issuer = (Issuer) builder.buildObject();
        issuer.setValue("https://samltest.id/saml/sp");
        logoutRequest.setIssuer(issuer);

        val messageContext = new MessageContext();
        messageContext.ensureSubcontext(SAMLBindingContext.class).setRelayState(UUID.randomUUID().toString());
        messageContext.setMessage(logoutRequest);

        val requestContext = MockRequestContext.create(applicationContext).withUserAgent();
        requestContext.setContextPath("/cas");
        delegatedSaml2IdPSloRequestProcessor.receive(requestContext.getHttpServletRequest(),
            requestContext.getHttpServletResponse(), logoutRequest, messageContext);
        requestContext.setRequestCookiesFromResponse();
        val cookieValue = delegatedSaml2IdPSloRequestCookieGenerator.retrieveCookieValue(requestContext.getHttpServletRequest());
        assertNotNull(cookieValue);
        
        val registeredService = new SamlRegisteredService();
        registeredService.setId(RandomUtils.nextInt());
        registeredService.setName("SAML");
        registeredService.setServiceId(issuer.getValue());
        registeredService.setMetadataLocation(issuer.getValue());
        servicesManager.save(registeredService);

        requestContext.getHttpServletResponse().reset();
        
        assertNull(action.execute(requestContext));
        assertNotNull(WebUtils.getRegisteredService(requestContext.getHttpServletRequest()));
        assertNotNull(WebUtils.getSingleLogoutRequest(requestContext.getHttpServletRequest()));
        assertNotNull(requestContext.getHttpServletRequest().getAttribute(SamlProtocolConstants.PARAMETER_SAML_RELAY_STATE));
        assertTrue(requestContext.getFlowScope().asMap().containsKey(SamlProtocolConstants.PARAMETER_SAML_RELAY_STATE));

        val cookie = requestContext.getHttpServletResponse().getCookie(delegatedSaml2IdPSloRequestCookieGenerator.getCookieName());
        assertNotNull(cookie);
        assertEquals(0, cookie.getMaxAge());
    }
This is {@link DelegatedAuthenticationSamlIdPSingleLogoutRequestProcessorTests}.

@author Misagh Moayyed
@since 7.3.0
support/cas-server-support-pac4j-saml/src/test/java/org/apereo/cas/web/saml2/DelegatedAuthenticationSamlIdPSingleLogoutRequestProcessorTests.java