public String humanReadableFormat(Duration duration) {
    return duration
        .toString()
        .substring(2)
        .replaceAll("(\\d[HMS])(?!$)", "$1 ")
        .toLowerCase(Locale.US);
  }
@Test
  public void shouldPrintHumanReadableDuration() {
    Assert.assertEquals("0s", DurationHelper.humanReadableFormat(Duration.ZERO));
    Assert.assertEquals("24h", DurationHelper.humanReadableFormat(Duration.ofDays(1)));
    Assert.assertEquals(
        "29h 5m 10s",
        DurationHelper.humanReadableFormat(
            Duration.ofDays(1).plusHours(5).plusMinutes(5).plusSeconds(10)));
    Assert.assertEquals("48h", DurationHelper.humanReadableFormat(Duration.ofDays(2)));
    Assert.assertEquals("1h", DurationHelper.humanReadableFormat(Duration.ofSeconds(3600)));
    Assert.assertEquals("1h 1m 20s", DurationHelper.humanReadableFormat(Duration.ofSeconds(3680)));
    Assert.assertEquals("15h", DurationHelper.humanReadableFormat(Duration.ofMinutes(900)));
  }