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

        WebUtils.putAuthentication(CoreAuthenticationTestUtils.getAuthentication(), context);
        WebUtils.putServiceIntoFlowScope(context, CoreAuthenticationTestUtils.getWebApplicationService());

        val locator = mock(ResponseBuilderLocator.class);
        when(locator.locate(any(WebApplicationService.class)))
            .thenReturn(new WebApplicationServiceResponseBuilder(this.servicesManager, this.urlValidator));

        val redirectToServiceAction = new InjectResponseHeadersAction(locator);
        val event = redirectToServiceAction.execute(context);
        assertEquals(CasWebflowConstants.STATE_ID_SUCCESS, event.getId());
        assertNotNull(context.getHttpServletResponse().getHeader(CasProtocolConstants.PARAMETER_SERVICE));
    }
This is {@link InjectResponseHeadersActionTests}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-webflow/src/test/java/org/apereo/cas/web/flow/actions/InjectResponseHeadersActionTests.java