### Question:
RandomUtils { public static String randomAlpha(int length) { if (length <= 0) { throw new IllegalArgumentException("Invalid length: " + length); } StringBuilder str = new StringBuilder(length); for (int i = 0; i < length; i++) { str.append(ALPHA.charAt(RANDOM.nextInt(ALPHA_LENGTH))); } return str.toString(); }  static String randomAlpha(int length); static String randomNumeric(int length); static String randomAlphaNumeric(int length); static long nextLong(final long start, final long end); static double nextDouble(final double start, final double end);  }### Answer:
@Test public void testRandomAlpha() { Stopwatch sw = Stopwatch.createStarted(); Set<String> randoms = new HashSet<>(); for (int i = 0; i < COUNTS; i++) { randoms.add(RandomUtils.randomAlpha(10)); } sw.stop(); System.out.println("randomAlpha = " + sw.toString() + "\t\t" + randoms.size()); Stopwatch sw2 = Stopwatch.createStarted(); Set<String> randoms2 = new HashSet<>(); for (int i = 0; i < COUNTS; i++) { randoms2.add(RandomStringUtils.randomAlphabetic(10)); } sw2.stop(); System.out.println("RandomStringUtils.randomAlphabetic = " + sw2.toString() + "\t\t" + randoms2.size()); Assert.assertTrue(sw.elapsed(TimeUnit.MILLISECONDS) < 2 * sw2.elapsed(TimeUnit.MILLISECONDS)); Assert.assertTrue(randoms.size() >= randoms2.size() * .9999); }