@Override
  public int nextInt(int min, int max) {
    if (max < min) {
      return 0; // handle max == 0 and avoid divide-by-zero exceptions
    }

    return nextInt(max - min) + min;
  }
Returns the next pseudorandom, uniformly distributed {@code int} value from this random number
generator's sequence within a range from min to max. If max &lt; min, returns 0.

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