### Question:
ProgressReporterUtil { String buildProgressReportString(boolean done, double progress, long elapsedMillis, long waitedMillis) { if (done) { return ProgressReporterUtil.MAX_PROGRESS; } if (progress == 0) { return String.format( "waited %s - %3d%% - est. %s", ProgressReporterUtil.TIME_FORMATTER.format(LocalTime.MIDNIGHT.plus(Duration.ofMillis(waitedMillis))), 0, UNKNOWN ); } long estimateMillis = DoubleMath.roundToLong(elapsedMillis / progress - elapsedMillis, RoundingMode.HALF_UP); Duration estimate = Duration.ofMillis(estimateMillis); int percent = DoubleMath.roundToInt(progress * 100, RoundingMode.FLOOR); return String.format("waited %s - %3d%% - est. %s", ProgressReporterUtil.TIME_FORMATTER.format(LocalTime.MIDNIGHT.plus(Duration.ofMillis(waitedMillis))), percent, ProgressReporterUtil.TIME_FORMATTER.format(LocalTime.MIDNIGHT.plus(estimate))); }    }### Answer:
@Test void buildProgressReportString() { assertThat(ProgressReporterUtil.buildProgressReportString(false, 0.2d, TimeUnit.MINUTES.toMillis(2),0)).endsWith("est. 00h 08m 00s "); assertThat(ProgressReporterUtil.buildProgressReportString(false, 0.1d, TimeUnit.MINUTES.toMillis(2),0)).endsWith("est. 00h 18m 00s "); }