### Question:
SwaggerBasePathRewritingFilter extends SendResponseFilter { @Override public boolean shouldFilter() { return RequestContext.getCurrentContext().getRequest().getRequestURI().endsWith(Swagger2Controller.DEFAULT_URL); }  @Override String filterType(); @Override int filterOrder(); @Override boolean shouldFilter(); @Override Object run(); static byte[] gzipData(String content);  }### Answer:
@Test public void shouldFilter_on_default_swagger_url() { MockHttpServletRequest request = new MockHttpServletRequest("GET", DEFAULT_URL); RequestContext.getCurrentContext().setRequest(request); assertTrue(filter.shouldFilter()); }
@Test public void shouldFilter_on_default_swagger_url_with_param() { MockHttpServletRequest request = new MockHttpServletRequest("GET", DEFAULT_URL); request.setParameter("debug", "true"); RequestContext.getCurrentContext().setRequest(request); assertTrue(filter.shouldFilter()); }
@Test public void shouldNotFilter_on_wrong_url() { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/management/info"); RequestContext.getCurrentContext().setRequest(request); assertFalse(filter.shouldFilter()); }