@Test
public void testReadTimedOut() {

  // Check success case.
  IOException x = new SocketTimeoutException("Read timed out");
  assertThat(errorExtractor.readTimedOut(x)).isTrue();
  // Check failure cases.
  x = new IOException("not a SocketTimeoutException");
  assertThat(errorExtractor.readTimedOut(x)).isFalse();
  x = new SocketTimeoutException("not the right kind of timeout");
  assertThat(errorExtractor.readTimedOut(x)).isFalse();
}