### Question:
CacheRevalidatorBase implements Closeable { boolean isStale(final HttpResponse httpResponse) { for (final Iterator<Header> it = httpResponse.headerIterator(HeaderConstants.WARNING); it.hasNext(); ) { final Header warning = it.next(); final String warningValue = warning.getValue(); if (warningValue.startsWith("110") || warningValue.startsWith("111")) { return true; } } return false; } CacheRevalidatorBase(
            final ScheduledExecutor scheduledExecutor,
            final SchedulingStrategy schedulingStrategy);  CacheRevalidatorBase(
            final ScheduledThreadPoolExecutor scheduledThreadPoolExecutor,
            final SchedulingStrategy schedulingStrategy); static ScheduledExecutor wrap(final ScheduledExecutorService executorService); @Override void close(); void awaitTermination(final Timeout timeout);  }### Answer:
@Test public void testStaleResponse() { final HttpResponse response1 = new BasicHttpResponse(HttpStatus.SC_OK); response1.addHeader(HeaderConstants.WARNING, "110 localhost \"Response is stale\""); Assert.assertThat(impl.isStale(response1), CoreMatchers.equalTo(true)); final HttpResponse response2 = new BasicHttpResponse(HttpStatus.SC_OK); response2.addHeader(HeaderConstants.WARNING, "111 localhost \"Revalidation failed\""); Assert.assertThat(impl.isStale(response2), CoreMatchers.equalTo(true)); final HttpResponse response3 = new BasicHttpResponse(HttpStatus.SC_OK); response3.addHeader(HeaderConstants.WARNING, "xxx localhost \"Huh?\""); Assert.assertThat(impl.isStale(response3), CoreMatchers.equalTo(false)); final HttpResponse response4 = new BasicHttpResponse(HttpStatus.SC_OK); Assert.assertThat(impl.isStale(response4), CoreMatchers.equalTo(false)); }