@Override
  public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    // Add policies to all HTTP headers
    for (String header : this.cspHeaders) {
      ((HttpServletResponse) response).setHeader(header, this.policies);
    }

    chain.doFilter(request, response);
  }
@Test
  public void set_content_security_headers() throws Exception {
    doInit();
    HttpServletRequest request = newRequest("/");
    underTest.doFilter(request, response, chain);
    verify(response).setHeader("Content-Security-Policy", EXPECTED);
    verify(response).setHeader("X-Content-Security-Policy", EXPECTED);
    verify(response).setHeader("X-WebKit-CSP", EXPECTED);
    verify(chain).doFilter(request, response);
  }