private RequestContext prepareContext() throws Exception {
        val context = MockRequestContext.create(applicationContext);

        context.setRemoteAddr("185.86.151.11");
        context.setLocalAddr("185.88.151.11");
        context.withUserAgent();
        context.setClientInfo();

        val registeredService = RegisteredServiceTestUtils.getRegisteredService("https://wsfedservice-validate");
        servicesManager.save(registeredService);

        val service = RegisteredServiceTestUtils.getService(registeredService.getServiceId());
        context.setParameter(CasProtocolConstants.PARAMETER_SERVICE, service.getId());
        val wsConfig = wsFederationConfigurations.toList().getFirst();
        val id = wsConfig.getId();
        context.setParameter(WsFederationNavigationController.PARAMETER_NAME, id);
        wsFederationNavigationController.redirectToProvider(id, context.getHttpServletRequest(), context.getHttpServletResponse());
        context.setRequestCookiesFromResponse();

        val wresult = IOUtils.toString(new ClassPathResource("goodTokenResponse.txt").getInputStream(), StandardCharsets.UTF_8);
        context.setParameter(WsFederationResponseValidator.WRESULT, wresult);
        context.setParameter(WsFederationCookieManager.WCTX, id);
        return context;
    }
This is {@link WsFederationResponseValidatorTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-wsfederation-webflow/src/test/java/org/apereo/cas/web/flow/WsFederationResponseValidatorTests.java