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

    for (int length = 1; length < LogUtils.MAX_TRUNCATED_LENGTH; length++) {
      String truncated = LogUtils.truncateMessageLineLength(s, length);
      assertTrue(truncated.startsWith(s.substring(0, length) + " ..."));
    }
  }