public void testRequestWithoutParameter() throws Exception { filter.setPattern(Pattern.compile("d-\\d+-e")); request.addParameter("any", "thing"); request.addParameter("other", "foo"); assertNull( "FILTER_APPLIED initially set", request.getAttribute(RequestConstants.FILTER_APPLIED)); filter.doFilter(request, response, filterChain); verifyMocks(); assertNull("FILTER_APPLIED set", request.getAttribute(RequestConstants.FILTER_APPLIED)); }