Randoms { public static double nextDouble(double min, double max) { return (max - min) * ThreadLocalRandom.current().nextDouble() + min; }  static String alphaNumeric(int length); static double nextDouble(double min, double max); static int nextInt(int min, int max);  }
@Test void nextDouble() { double number = Randoms.nextDouble(8000, 12000); assertThat(number).isGreaterThanOrEqualTo(8000).isLessThan(12000); number = Randoms.nextDouble(0.8, 1.2); assertThat(number).isGreaterThanOrEqualTo(0.8).isLessThan(1.2); }