public static String truncateMessageLineLength(Object message) {
    return truncateMessageLineLength(message, MAX_TRUNCATED_LENGTH);
  }
@Test
  public void truncateLong() throws Exception {
    String s;

    for (int i = 0; i < 20; i++) {
      s = CommonUtils.randomAlphaNumString(ThreadLocalRandom.current()
          .nextInt(LogUtils.MAX_TRUNCATED_LENGTH + 1, 2 + LogUtils.MAX_TRUNCATED_LENGTH));
      String truncated = LogUtils.truncateMessageLineLength(s);
      assertTrue(truncated.startsWith(s.substring(0, LogUtils.MAX_TRUNCATED_LENGTH) + " ..."));
    }
  }