@Test
    void verifyOperation() throws Throwable {
        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        val ctx = new MockServletContext();

        val filter = new AddResponseHeadersFilter();
        filter.setHeadersMap(CollectionUtils.wrap("key1", "value1", "key2", "value2"));
        val config = new MockFilterConfig(ctx);
        config.addInitParameter("key3", "value3");
        filter.init(config);
        filter.doFilter(request, response, new MockFilterChain());
        assertTrue(response.containsHeader("key1"));
        assertTrue(response.containsHeader("key2"));
        filter.destroy();
    }
This is {@link AddResponseHeadersFilterTests}.

@author Misagh Moayyed
@since 6.1.0
core/cas-server-core-web-api/src/test/java/org/apereo/cas/web/support/filters/AddResponseHeadersFilterTests.java