@Test public void testRandom() { for (int length = 1; length < 10; length++) { String value = RandomStringUtils.random(length); Assert.assertEquals( "random string has a length of " + length, length, value.length()); Assert.assertTrue( "random string is alphanumeric", isAsciiAlphanumeric(value)); } }
public static String random(int length) { return new RandomStringGenerator.Builder() .filteredBy(NUMBERS, LETTERS) .build().generate(length); }
RandomStringUtils { public static String random(int length) { return new RandomStringGenerator.Builder() .filteredBy(NUMBERS, LETTERS) .build().generate(length); } }
RandomStringUtils { public static String random(int length) { return new RandomStringGenerator.Builder() .filteredBy(NUMBERS, LETTERS) .build().generate(length); } private  RandomStringUtils(); }
RandomStringUtils { public static String random(int length) { return new RandomStringGenerator.Builder() .filteredBy(NUMBERS, LETTERS) .build().generate(length); } private  RandomStringUtils(); static String random(int length); static String randomLetters(int length); static String randomNumeric(int length); }
RandomStringUtils { public static String random(int length) { return new RandomStringGenerator.Builder() .filteredBy(NUMBERS, LETTERS) .build().generate(length); } private  RandomStringUtils(); static String random(int length); static String randomLetters(int length); static String randomNumeric(int length);  }