### Question:
SurenessCommonUtil { public static String getRandomString(int length) { if (length < 1) { length = 6; } Random random = new Random(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < length; i++) { int number = random.nextInt(RANDOM_CHAR.length()); sb.append(RANDOM_CHAR.charAt(number)); } return sb.toString(); }  static String findUserAgent(HttpServletRequest request); static String findUserAgent(ContainerRequestContext request); static String findUserAgent(String userAgent); static String getRandomString(int length);  }### Answer:
@Test public void getRandomString() { String randomString = SurenessCommonUtil.getRandomString(6); assertNotNull(randomString); assertEquals(6, randomString.length()); }