@Test
    @Order(1)
    void verifyOperationWithRedirect() throws Throwable {
        val context = MockRequestContext.create(applicationContext).withUserAgent().setClientInfo();
        DelegationWebflowUtils.putDelegatedAuthenticationClientName(context, "SAML2Client");
        WebUtils.putLogoutRedirectUrl(context, "https://google.com");

        val webContext = new JEEContext(context.getHttpServletRequest(), context.getHttpServletResponse());
        val samlClient = (SAML2Client) identityProviders.findClient("SAML2RedirectLogoutClient", webContext).orElseThrow();
        samlClient.init();
        val userProfile = new SAML2Profile();
        userProfile.setId("casuser");

        val callContext = new CallContext(new JEEContext(context.getHttpServletRequest(), context.getHttpServletResponse()), new JEESessionStore());
        val action = (WithLocationAction) samlClient.getLogoutActionBuilder()
            .getLogoutAction(callContext, userProfile, "https://google.com")
            .orElseThrow();

        val logoutRequest = DelegatedAuthenticationClientLogoutRequest.builder()
            .target("https://google.com")
            .location(action.getLocation())
            .status(302)
            .build();
        DelegationWebflowUtils.putDelegatedAuthenticationLogoutRequest(context, logoutRequest);

        val result = delegatedAuthenticationClientFinishLogoutAction.execute(context);
        assertNull(result);
        assertNull(WebUtils.getLogoutRedirectUrl(context, String.class));
        assertNotNull(DelegationWebflowUtils.getDelegatedAuthenticationLogoutRequestTicket(context));
    }
This is {@link DelegatedAuthenticationClientFinishLogoutActionTests}.

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