  @Test
  void calculateBackoffUsesDefaultClockWhenNoScheduler() {

    Instant timeoutInstant = Instant.now().plusSeconds(3);

    AbstractRetry<String, Integer> abstractRetry = new AbstractRetry<String, Integer>(2, Duration.ofSeconds(1),
      Backoff.fixed(Duration.ofMillis(600)), Jitter.NO_JITTER, null, null) {
      @Override
      public Publisher<Long> apply(Flux<Integer> integerFlux) {
        return null;
      }
    };

    RetryContext<String> retryContext = new DefaultContext<>(null, 1, BackoffDelay.ZERO, null);

    BackoffDelay backoff = abstractRetry.calculateBackoff(retryContext, timeoutInstant);
    assertNotEquals(backoff, AbstractRetry.RETRY_EXHAUSTED);
    assertEquals(backoff.delay, Duration.ofMillis(600));
  }