@Test
    void verifySaml2LogoutResponse() throws Throwable {
        val context = MockRequestContext.create(applicationContext);
        val webContext = new JEEContext(context.getHttpServletRequest(), context.getHttpServletResponse());
        val client = identityProviders.findClient("SAML2Client", webContext).orElseThrow();

        context.withUserAgent();
        context.setParameter(Pac4jConstants.DEFAULT_CLIENT_NAME_PARAMETER, client.getName());
        context.setMethod(HttpMethod.POST);

        val logoutResponse = getLogoutResponse();
        context.setContent(EncodingUtils.encodeBase64(logoutResponse));

        val service = RegisteredServiceTestUtils.getService(UUID.randomUUID().toString());
        servicesManager.save(RegisteredServiceTestUtils.getRegisteredService(service.getId(), Map.of()));
        context.setParameter(CasProtocolConstants.PARAMETER_SERVICE, service.getId());
        
        val ticket = delegatedClientAuthenticationWebflowManager.store(context, webContext, client);
        context.setParameter(DelegatedClientAuthenticationWebflowManager.PARAMETER_CLIENT_ID, ticket.getId());

        val event = delegatedAuthenticationAction.execute(context);
        assertEquals(CasWebflowConstants.TRANSITION_ID_LOGOUT, event.getId());
    }
This class tests the {@link DelegatedClientAuthenticationAction} class.

@author Jerome Leleu
@since 7.1.0
support/cas-server-support-pac4j-saml/src/test/java/org/apereo/cas/web/saml2/DelegatedClientAuthenticationActionSamlTests.java