code: public static long random(long min, long max) {
          return Math.round(ThreadLocalRandom.current().nextDouble()
                  * (max - min) + min);
      }
docs: Generates a random number from a specified range
  
  @param min The minimal number of the range
  @param max The maximal number of the range
  @return A random number from minimal number to maximal number, which contains minimal and maximal number.