@Override
  public long nextLong(long max) {
    if (max == Long.MAX_VALUE) {
      max--;
    }
    return Math.abs(nextLong()) % (max + 1);
  }
Returns the next pseudorandom, uniformly distributed {@code long} value from this random number
generator's sequence within a range from 0 to max.

@param max the maximum range (inclusive) for the pseudorandom.
@return the next pseudorandom, uniformly distributed {@code long} value from this random number
        generator's sequence.
geode-junit/src/main/java/org/apache/geode/test/junit/rules/RandomRule.java