ResourceCacheControl implements Filter { boolean isCacheableResourceRequest(HttpServletRequest request) { String requestPath = request.getPathInfo(); if (requestPath == null) { return false; } for (String resourcePrefix : resourcePrefixes) { if (requestPath.startsWith(resourcePrefix)) { return true; } } return false; } ResourceCacheControl(); static synchronized void install(); @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void destroy();  }
@Test public void test_getPathInfo_null_JENKINS_40116() throws IOException, ServletException { Mockito.when(servletRequest.getPathInfo()).thenReturn(null); Assert.assertFalse(resourceCacheControl.isCacheableResourceRequest(servletRequest)); }
@Test public void test_getPathInfo_not_null_JENKINS_40116() throws IOException, ServletException { Mockito.when(servletRequest.getPathInfo()).thenReturn("/a/b/c.js"); Assert.assertTrue(resourceCacheControl.isCacheableResourceRequest(servletRequest)); }