docs: public RetryPolicy<R> withMaxDuration(Duration maxDuration) {
      Assert.notNull(maxDuration, "maxDuration");
      Assert.state(maxDuration.toNanos() > delay.toNanos(), "maxDuration must be greater than the delay");
      this.maxDuration = maxDuration;
      return this;
    }