### Question:
Retry { public boolean canRetry() { return hasInfiniteRetries() || (retriesDone < maxRetries); } private  Retry(long maxRetries, long startWait, long waitIncrement, long maxWait, long logInterval,
      double backOffFactor); @VisibleForTesting void setBackOffFactor(double baskOffFactor); @VisibleForTesting double getWaitFactor(); boolean hasInfiniteRetries(); long getLogInterval(); boolean canRetry(); void useRetry(); boolean hasRetried(); long retriesCompleted(); void waitForNextAttempt(); void logRetry(Logger log, String message, Throwable t); void logRetry(Logger log, String message); static NeedsRetries builder();  }### Answer:
@Test public void canRetryDoesntAlterState() { for (int i = 0; i < MAX_RETRIES + 1; i++) { assertTrue(retry.canRetry()); } }