@Test
public void socketRetriesCorrectly() throws IOException {

  assertThat(RetryDeterminer.SOCKET_ERRORS.shouldRetry(new SocketTimeoutException())).isTrue();
  assertThat(
          RetryDeterminer.SOCKET_ERRORS.shouldRetry(
              new SSLException("test", new SocketException())))
      .isTrue();
  assertThat(RetryDeterminer.SOCKET_ERRORS.shouldRetry(new SSLException("invalid certificate")))
      .isFalse();
  assertThat(RetryDeterminer.SOCKET_ERRORS.shouldRetry(new IOException("Hey"))).isFalse();
  assertThat(RetryDeterminer.SOCKET_ERRORS.shouldRetry(makeHttpException(300))).isFalse();
  assertThat(RetryDeterminer.SOCKET_ERRORS.shouldRetry(makeHttpException(504))).isFalse();
}