CacheRequestContext { public RequestCacheControl getCacheControl() { if (_cacheControl == null) { List<String> values = _headers.get(CACHE_CONTROL); _cacheControl = RequestCacheControl.DEFAULT; if (values != null) { String cacheControlHeader = HttpHeaderUtils.join(values); try { _cacheControl = isNullOrEmpty(cacheControlHeader) ? RequestCacheControl.DEFAULT : RequestCacheControl.valueOf(cacheControlHeader); } catch (IllegalArgumentException ex) { LOG.debug("Invalid request cache control header", ex); } } } return _cacheControl; } CacheRequestContext(String requestMethod, URI requestUri, MultivaluedMap<String, String> headers, String requestHash); static CacheRequestContext build(ContainerRequest request, Set<String> vary, boolean includeBody); URI getRequestUri(); String getRequestMethod(); String getRequestHash(); RequestCacheControl getCacheControl(); boolean isPragmaNoCache();  }
@Test(dataProvider = "getCacheControlData") public void getCacheControl(MultivaluedMap<String, String> headers, String cacheControl) { CacheRequestContext requestContext = new CacheRequestContext("GET", URI.create("http: assertEquals(requestContext.getCacheControl(), RequestCacheControl.valueOf(cacheControl)); }