public int getNextInt(int min, int max) {
    if (max == min) {
      return min;
    }
    // assert(max > min);

    return rand.nextInt(max - min + 1) + min;
  }
Simple utility to generate random values.
samza-tools/src/main/java/org/apache/samza/tools/RandomValueGenerator.java