public static String getFullElapsedTime(final long delta) {
        if (delta < Duration.ofSeconds(1).toMillis()) {
            return String.format("%d %s", delta, delta == 1 ? LocaleUtils.getLocalizedString("global.millisecond") : LocaleUtils.getLocalizedString("global.milliseconds"));
        } else if (delta < Duration.ofMinutes(1).toMillis()) {
            final long millis = delta % Duration.ofSeconds(1).toMillis();
            final long seconds = delta / Duration.ofSeconds(1).toMillis();
            final String secondsString = String.format("%d %s", seconds, seconds == 1 ? LocaleUtils.getLocalizedString("global.second") : LocaleUtils.getLocalizedString("global.seconds"));
            if (millis > 0) {
                return secondsString + ", " + getFullElapsedTime(millis);
            } else {
                return secondsString;
            }
        } else if (delta < Duration.ofHours(1).toMillis()) {
            final long millis = delta % Duration.ofMinutes(1).toMillis();
            final long minutes = delta / Duration.ofMinutes(1).toMillis();
            final String minutesString = String.format("%d %s", minutes, minutes == 1 ? LocaleUtils.getLocalizedString("global.minute") : LocaleUtils.getLocalizedString("global.minutes"));
            if (millis > 0) {
                return minutesString + ", " + getFullElapsedTime(millis);
            } else {
                return minutesString;
            }
        } else if (delta < Duration.ofDays(1).toMillis()) {
            final long millis = delta % Duration.ofHours(1).toMillis();
            final long hours = delta / Duration.ofHours(1).toMillis();
            final String daysString = String.format("%d %s", hours, hours == 1 ? LocaleUtils.getLocalizedString("global.hour") : LocaleUtils.getLocalizedString("global.hours"));
            if (millis > 0) {
                return daysString + ", " + getFullElapsedTime(millis);
            } else {
                return daysString;
            }
        } else {
            final long millis = delta % Duration.ofDays(1).toMillis();
            final long days = delta / Duration.ofDays(1).toMillis();
            final String daysString = String.format("%d %s", days, days == 1 ? LocaleUtils.getLocalizedString("global.day") : LocaleUtils.getLocalizedString("global.days"));
            if (millis > 0) {
                return daysString + ", " + getFullElapsedTime(millis);
            } else {
                return daysString;
            }
        }
    }
@Test
    public void testElapsedTimeInHours() throws Exception {
        assertThat(StringUtils.getFullElapsedTime(Duration.ofHours(1)), is("1 hour"));
        assertThat(StringUtils.getFullElapsedTime(Duration.ofHours(1).plus(Duration.ofMinutes(1)).plus(Duration.ofSeconds(1)).plus(Duration.ofMillis(1))), is("1 hour, 1 minute, 1 second, 1 ms"));
        assertThat(StringUtils.getFullElapsedTime(Duration.ofHours(10).plus(Duration.ofMinutes(30))), is("10 hours, 30 minutes"));
    }