@Nonnull
    @SuppressWarnings("checkstyle:MagicNumber") // number of hours per day isn't magic :)
    public static String formatJobDuration(long durationMs) {
        if (durationMs == Long.MIN_VALUE) {
            return "" + Long.MIN_VALUE;
        }
        String sign = "";
        if (durationMs < 0) {
            sign = "-";
            durationMs = -durationMs;
        }
        long millis = durationMs % 1000;
        durationMs /= 1000;
        long seconds = durationMs % 60;
        durationMs /= 60;
        long minutes = durationMs % 60;
        durationMs /= 60;
        long hours = durationMs % 24;
        durationMs /= 24;
        String textUpToHours = format("%02d:%02d:%02d.%03d", hours, minutes, seconds, millis);
        return sign + (durationMs > 0 ? durationMs + "d " : "") + textUpToHours;
    }
@Test
    public void test_formatJobDuration() {
        assertEquals("20:19:02.855", formatJobDuration(73_142_855));
        assertEquals("00:00:00.120", formatJobDuration(120));
        assertEquals("00:00:05.120", formatJobDuration(5120));
        assertEquals("13d 13:52:22.855", formatJobDuration(1173_142_855));
        assertEquals("2d 00:05:42.855", formatJobDuration(173_142_855));
        assertEquals("00:12:22.855", formatJobDuration(742_855));
        assertEquals("106751991167d 07:12:55.807", formatJobDuration(Long.MAX_VALUE));
        assertEquals("-9223372036854775808", formatJobDuration(Long.MIN_VALUE));
    }