docs: public RetryPolicy<R> withMaxAttempts(int maxAttempts) {
      Assert.isTrue(maxAttempts != 0, "maxAttempts cannot be 0");
      Assert.isTrue(maxAttempts >= -1, "maxAttempts cannot be less than -1");
      this.maxRetries = maxAttempts == -1 ? -1 : maxAttempts - 1;
      return this;
    }