@Test public void testCanRetry_whenUnderMax_returnsTrue() throws Exception { Response underMax = response.newBuilder().priorResponse(response).build(); assertTrue(authenticator.canRetry(underMax)); }
protected boolean canRetry(Response response) { int responseCount = 1; while ((response = response.priorResponse()) != null) { responseCount++; } return responseCount < MAX_RETRIES; }
BaseRefreshableAuthenticator implements Authenticator { protected boolean canRetry(Response response) { int responseCount = 1; while ((response = response.priorResponse()) != null) { responseCount++; } return responseCount < MAX_RETRIES; } }
BaseRefreshableAuthenticator implements Authenticator { protected boolean canRetry(Response response) { int responseCount = 1; while ((response = response.priorResponse()) != null) { responseCount++; } return responseCount < MAX_RETRIES; }  }
BaseRefreshableAuthenticator implements Authenticator { protected boolean canRetry(Response response) { int responseCount = 1; while ((response = response.priorResponse()) != null) { responseCount++; } return responseCount < MAX_RETRIES; }  @Override final Request refresh(Response response); }
BaseRefreshableAuthenticator implements Authenticator { protected boolean canRetry(Response response) { int responseCount = 1; while ((response = response.priorResponse()) != null) { responseCount++; } return responseCount < MAX_RETRIES; }  @Override final Request refresh(Response response);  }