private ClientCredential getClientCredential(final MockRequestContext context, final String sessionIdx,
                                                 final String clientName) {
        val webContext = new JEEContext(context.getHttpServletRequest(), context.getHttpServletResponse());
        val saml2MessageContext = new SAML2MessageContext(new CallContext(webContext, configurationContext.getSessionStore()));
        val messageContext = new MessageContext();
        val logoutRequest = mock(LogoutRequest.class);
        val sessionIndex = mock(SessionIndex.class);
        when(sessionIndex.getValue()).thenReturn(sessionIdx);
        when(logoutRequest.getSessionIndexes()).thenReturn(List.of(sessionIndex));
        messageContext.setMessage(logoutRequest);
        saml2MessageContext.setMessageContext(messageContext);
        return new ClientCredential(new SAML2Credentials(saml2MessageContext), clientName);
    }
This is {@link DelegatedAuthenticationIdentityProviderLogoutActionTests}.

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