code: public static long randomLongBetween(long min, long max) {
      Random rand = new Random();
      return min + (long) (rand.nextDouble() * (max - min));
    }
docs: Returns a long between interval
  @param min Minimum value
  @param max Maximum value
  @return long number