static String randomString(int len, Random random) {
    String LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
    String DIGITS = "0123456789";
    String LETTERS_AND_DIGITS = LETTERS + DIGITS;

    StringBuilder b = new StringBuilder();
    for (int i = 0; i < len; i++) {
      b.append(LETTERS_AND_DIGITS.charAt(random.nextInt(LETTERS_AND_DIGITS.length())));
    }
    return b.toString();
  }
Generate a random string of letters and digits of the given length

@param len The length of the string
@return The random string
ambry-network/src/test/java/com/github/ambry/network/SelectorTest.java