public static String random(final int count, final String chars) {
        if (chars == null) {
            return random(count, 0, 0, false, false, null, RANDOM);
        }
        return random(count, chars.toCharArray());
    }
<p>Creates a random string whose length is the number of characters
specified.</p>

<p>Characters will be chosen from the set of characters
specified by the string, must not be empty.
If null, the set of all characters is used.</p>

@param count the length of random string to create
@param chars the String containing the set of characters to use,
             may be null, but must not be empty
@return the random string
@throws IllegalArgumentException if {@code count} &lt; 0 or the string is empty.
android/android_framework/base/src/main/java/lang3/RandomStringUtils.java