CookieFilter extends AdviceFilter { @Override protected boolean preHandle(final ServletRequest request, final ServletResponse response) throws Exception { filterCookies(request, response); return true; }    }
@Test public void ifRequestIsSecureSetSecureCookieAttributeWhenMissingBeforeProcessingFilterchain() throws Exception { setup(request, response); cookieFilter.preHandle(request, response); verifyResponse(response); }