@Test public void callbackHasOriginalCallResponse() throws InterruptedException {

  RetryableCalls retryableCalls = new RetryableCalls();
  MockWebServer server = new MockWebServer();
  Retrofit retrofit = new Retrofit.Builder()
      .baseUrl(server.url("/"))
      .addCallAdapterFactory(retryableCalls.getFactory())
      .addConverterFactory(new ToStringConverterFactory())
      .build();
  Service service = retrofit.create(Service.class);
  final CountDownLatch responseLatch = new CountDownLatch(1);
  server.enqueue(new MockResponse().setBody("Hi"));
  final AtomicReference<RetryableCall<String>> responseCallRef = new AtomicReference<>();
  RetryableCall<String> call = service.getString();
  call.enqueue(new RetryableCallback<String>() {
    @Override public void onResponse(RetryableCall<String> call, Response<String> response) {
      responseCallRef.set(call);
      responseLatch.countDown();
    }
    @Override public void onFailure(RetryableCall<String> call, Throwable t) {
      throw new AssertionError();
    }
    @Override public void onFailureButCanRetry(RetryableCall<String> call, IOException e) {
      throw new AssertionError();
    }
  });
  assertThat(responseLatch.await(10, SECONDS)).isTrue();
  assertThat(responseCallRef.get()).isSameAs(call);
}