Randoms { public static String alphaNumeric(int length) { StringBuilder builder = new StringBuilder(length); for (int i = 0; i < length; i++) builder.append(ALPHA_NUMERIC.charAt(ThreadLocalRandom.current().nextInt(ALPHA_NUMERIC.length()))); return builder.toString(); }  static String alphaNumeric(int length); static double nextDouble(double min, double max); static int nextInt(int min, int max);  }
@Test void alphaNumeric() { assertThat(Randoms.alphaNumeric(3).length()).isEqualTo(3); assertThat(Randoms.alphaNumeric(5).length()).isEqualTo(5); assertThat(Randoms.alphaNumeric(10).length()).isEqualTo(10); }