### Question:
RequestPathHttpCacheConfigExtension implements HttpCacheConfigExtension, CacheKeyFactory { @Override public boolean accepts(SlingHttpServletRequest request, HttpCacheConfig cacheConfig) { RequestPathInfo requestPathInfo = request.getRequestPathInfo(); boolean match = matches(resourcePathPatterns, requestPathInfo.getResourcePath()) && matches(selectorPatterns, requestPathInfo.getSelectorString()) && matches(extensionPatterns, requestPathInfo.getExtension()); log.debug("Extension {} : Passed : {} for {}", configName, match, requestPathInfo.getResourcePath()); return match; }  @Override boolean accepts(SlingHttpServletRequest request, HttpCacheConfig cacheConfig); @Override CacheKey build(SlingHttpServletRequest slingHttpServletRequest, HttpCacheConfig cacheConfig); @Override CacheKey build(String resourcePath, HttpCacheConfig httpCacheConfig); @Override boolean doesKeyMatchConfig(CacheKey key, HttpCacheConfig cacheConfig);  }### Answer:
@Test public void test_match() { prepRequestPathInfo("/content/acs-commons/en/homepage/jcr:content/component.content.html"); boolean actual = extension.accepts(request, null); assertTrue(actual); }
@Test public void test_no_path_match() { prepRequestPathInfo("/content/chuck-norris/en/homepage/jcr:content/component.content.html"); boolean actual = extension.accepts(request, null); assertFalse(actual); }
@Test public void test_no_selector_match() { prepRequestPathInfo("/content/acs-commons/en/homepage/jcr:content/component.body.html"); boolean actual = extension.accepts(request, null); assertFalse(actual); }
@Test public void test_no_extension_match() { prepRequestPathInfo("/content/acs-commons/en/homepage/jcr:content/component.body.json"); boolean actual = extension.accepts(request, null); assertFalse(actual); }