@Test
    @Order(3)
    void verifyLogoutResponse() throws Throwable {
        val request = new MockHttpServletRequest();
        request.setMethod("GET");
        val response = new MockHttpServletResponse();

        val service = getSamlRegisteredServiceFor(false, false, false, "https://cassp.example.org");

        servicesManager.save(service);
        var builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory().getBuilder(LogoutResponse.DEFAULT_ELEMENT_NAME);
        var logoutResponse = (LogoutResponse) builder.buildObject();

        builder = (SAMLObjectBuilder) openSamlConfigBean.getBuilderFactory().getBuilder(Issuer.DEFAULT_ELEMENT_NAME);
        val issuer = (Issuer) builder.buildObject();
        issuer.setValue(service.getServiceId());
        logoutResponse.setIssuer(issuer);
        logoutResponse.setID(UUID.randomUUID().toString());
        logoutResponse.setInResponseTo("https://cas.example.org");

        val encoder = new SamlIdPHttpRedirectDeflateEncoder("https://cas.example.org/logout", logoutResponse);
        encoder.setRelayState("CasRelayState");
        encoder.doEncode();

        assertTrue(encoder.getRedirectUrl().contains("CasRelayState"));
        val queryStrings = StringUtils.remove(encoder.getRedirectUrl(), "https://cas.example.org/logout?");
        new URLBuilder(encoder.getRedirectUrl())
            .getQueryParams().forEach(param -> request.addParameter(param.getFirst(), param.getSecond()));
        request.setQueryString(queryStrings);
        controller.handleSaml2ProfileSLORedirectRequest(response, request);
        assertEquals(HttpStatus.SC_OK, response.getStatus());
    }
This is {@link SLOSamlIdPRedirectProfileHandlerControllerTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/web/idp/profile/slo/SLOSamlIdPRedirectProfileHandlerControllerTests.java