public static String truncateMessageLineLength(Object message) {
    return truncateMessageLineLength(message, MAX_TRUNCATED_LENGTH);
  }
@Test
  public void truncateShort() throws Exception {
    String s;
    assertEquals("null", LogUtils.truncateMessageLineLength(null));
    s = CommonUtils.randomAlphaNumString(1);
    assertEquals(s, LogUtils.truncateMessageLineLength(s));
    s = CommonUtils.randomAlphaNumString(LogUtils.MAX_TRUNCATED_LENGTH);
    assertEquals(s, LogUtils.truncateMessageLineLength(s));

    for (int i = 0; i < 20; i++) {
      s = CommonUtils.randomAlphaNumString(
          ThreadLocalRandom.current().nextInt(2, LogUtils.MAX_TRUNCATED_LENGTH));
      assertEquals(s, LogUtils.truncateMessageLineLength(s));
    }
  }