@Override
    public void doFilter(ServletRequest request,
                         ServletResponse response,
                         FilterChain chain) throws IOException, ServletException {
        if (response instanceof HttpServletResponse) {
            final HttpServletResponse resp = (HttpServletResponse) response;
            resp.setHeader("Cache-Control", CACHE_SETTINGS);
        }
        chain.doFilter(request, response);
    }
@Test
    void setsACacheHeaderOnTheResponse() throws Exception {
        filter.doFilter(request, response, chain);

        final InOrder inOrder = inOrder(response, chain);
        inOrder.verify(response).setHeader("Cache-Control", "must-revalidate,no-cache,no-store");
        inOrder.verify(chain).doFilter(request, response);
    }