@Test
void failedToRetry() throws IOException {

    var request = new Request.Builder().url("http://localhost").build();
    var chain = mock(Interceptor.Chain.class);
    when(chain.request()).thenReturn(request);
    when(chain.proceed(request)).thenThrow(new ConnectException("connection refused"));
    assertThatThrownBy(() -> interceptor.intercept(chain))
            .isInstanceOf(ConnectException.class)
            .hasMessageContaining("connection refused");
}