@Test
    void verifyOperationWithProfile() throws Throwable {
        val context = MockRequestContext.create(applicationContext).withUserAgent().setClientInfo();

        WebUtils.putServiceIntoFlowScope(context, RegisteredServiceTestUtils.getService());

        val profile = new CommonProfile();
        profile.setId("casuser");
        profile.setClientName("CasClient");
        context.setRequestAttribute(Pac4jConstants.USER_PROFILES,
            CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));
        val result = delegatedAuthenticationClientLogoutAction.execute(context);
        assertNull(result);
        assertEquals(HttpStatus.SC_MOVED_TEMPORARILY, context.getHttpServletResponse().getStatus());
        val delegatedAuthenticationLogoutRequest = DelegationWebflowUtils.getDelegatedAuthenticationLogoutRequest(context, DelegatedAuthenticationClientLogoutRequest.class);
        assertNotNull(delegatedAuthenticationLogoutRequest);
        assertNotNull(delegatedAuthenticationLogoutRequest.getTarget());
        assertNotNull(delegatedAuthenticationLogoutRequest.getLocation());
        val tgt = new MockTicketGrantingTicket("casuser");

        logoutManager.performLogout(SingleLogoutExecutionRequest.builder()
            .httpServletRequest(Optional.of(context.getHttpServletRequest()))
            .httpServletResponse(Optional.of(context.getHttpServletResponse()))
            .ticketGrantingTicket(tgt)
            .build());
        assertNull(context.getHttpServletRequest().getSession(false));
    }
This is {@link DelegatedAuthenticationClientLogoutActionTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-pac4j-webflow/src/test/java/org/apereo/cas/web/flow/actions/DelegatedAuthenticationClientLogoutActionTests.java