@Test
    void verifyOperationPostMethod() throws Exception {
        val sessionIndexValue = UUID.randomUUID().toString();
        val authentication = CoreAuthenticationTestUtils.getAuthentication(UUID.randomUUID().toString(),
            Map.of("sessionindex", List.of(sessionIndexValue)));
        val ticket = new TicketGrantingTicketImpl(UUID.randomUUID().toString(),
            authentication, NeverExpiresExpirationPolicy.INSTANCE);
        ticketRegistry.addTicket(ticket);

        val context = MockRequestContext.create(applicationContext);
        context.setMethod(HttpMethod.POST);
        val webContext = new JEEContext(context.getHttpServletRequest(), context.getHttpServletResponse());
        val manager = new ProfileManager(webContext, delegatedClientDistributedSessionStore);
        val profile = new CommonProfile();
        profile.setId(UUID.randomUUID().toString());
        profile.setClientName("SAML2Client");
        manager.save(true, profile, false);

        val saml2MessageContext = new SAML2MessageContext(new CallContext(webContext, delegatedClientDistributedSessionStore));
        val messageContext = new MessageContext();
        val logoutRequest = mock(LogoutRequest.class);
        val sessionIndex = mock(SessionIndex.class);
        when(sessionIndex.getValue()).thenReturn(sessionIndexValue);
        when(logoutRequest.getSessionIndexes()).thenReturn(List.of(sessionIndex));
        messageContext.setMessage(logoutRequest);
        saml2MessageContext.setMessageContext(messageContext);
        val clientCred = new ClientCredential(new SAML2Credentials(saml2MessageContext), profile.getClientName(), false, profile);
        WebUtils.putCredential(context, clientCred);
        delegatedSaml2ClientLogoutAction.execute(context);
        assertNull(ticketRegistry.getTicket(ticket.getId()));
    }
This is {@link DelegatedSaml2ClientLogoutActionTests}.

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