### Question:
Utils { public static String longToTimePeriod(long msec) { if (msec < 1000) { return msec + "ms"; } if (msec < 3000) { return String.format("%.2fs", msec / 1000d); } if (msec < 60 * 1000) { return (msec / 1000) + "s"; } long sec = msec / 1000; if (sec < 5 * 60) { return (sec / 60) + "m" + (sec % 60) + "s"; } long min = sec / 60; if (min < 60) { return min + "m"; } long hour = min / 60; if (min < 24 * 60) { return hour + "h" + (min % 60) + "m"; } long day = hour / 24; return day + "d" + (day % 24) + "h"; }  static String longToTimePeriod(long msec); static SecureRandom getRandom(); static String getNodeIdShort(String nodeId); static long toUnixTime(long javaTime); static long fromUnixTime(long unixTime); @SafeVarargs static T[] mergeArrays(T[]... arr); static String align(String s, char fillChar, int targetLen, boolean alignRight); static String repeat(String s, int n); static void showErrorAndExit(String message, String... messages); static void showWarn(String message, String... messages); static String sizeToStr(long size); static void sleep(long ms); @Deprecated static long time();  }### Answer:
@Test public void longToTimePeriod() { Assert.assertEquals("1ms", Utils.longToTimePeriod(1)); }