code: @Override
      public T next() {
          int retryCount = 0;
          do {
              T next = delegate.next();
              if (!alreadyGenerated.contains(next)) {
                  alreadyGenerated.add(next);
                  return next;
              }
  
              retryCount++;
          } while (retryCount <= numberOfRetries);
  
          throw new IllegalStateException(on(" ").join("Exhausted", numberOfRetries, "retries trying to generate unique value"));
      }
docs: Returns unique &lt;T&gt; generated by delegate Generator&lt;T&gt;
  
  @return generated unique &lt;T&gt;
  @throws IllegalStateException when number of retries is exhausted