@Test(dataProvider = "valueOfData")
public void valueOf(String value, boolean noCache, boolean noStore, boolean noTransform, boolean onlyIfCached, int maxAge, int maxStale, int minFresh, Map<String, Optional<String>> cacheExtension) {

    RequestCacheControl cacheControl = RequestCacheControl.valueOf(value);
    assertEquals(cacheControl.isNoCache(), noCache);
    assertEquals(cacheControl.isNoStore(), noStore);
    assertEquals(cacheControl.isNoTransform(), noTransform);
    assertEquals(cacheControl.isOnlyIfCached(), onlyIfCached);
    assertEquals(cacheControl.getCacheExtension(), cacheExtension == null ? ImmutableMap.of() : cacheExtension);
    assertEquals(cacheControl.getMaxAge(), maxAge);
    assertEquals(cacheControl.getMaxStale(), maxStale);
    assertEquals(cacheControl.getMinFresh(), minFresh);
}