@Test
public void forCacheControl() {
final Parser<CacheControl> parser = Parser.forCacheControl();
final CacheControl cc1 = createCacheControl();
cc1.setMaxAge(2000);
final CacheControl cc2 = createCacheControl();
cc2.setNoCache(true);
for (final CacheControl v : new CacheControl[] { cc1, cc2 }) {
final String asString = parser.asString(v);
final CacheControl valueOf = parser.valueOf(asString);
assertThat(v.getMaxAge(), is(equalTo(valueOf.getMaxAge())));
assertThat(v.isNoCache(), is(equalTo(valueOf.isNoCache())));
}
}