DurationInfo extends OperationDuration implements AutoCloseable { @Override public String toString() { return getFormattedText() + ": duration " + super.toString(); } DurationInfo(Logger log, String format, Object... args);  DurationInfo(Logger log,
      boolean logAtInfo,
      String format,
      Object... args); @Override String toString(); @Override void close();  }
@Test public void testDurationInfoCreation() throws Exception { DurationInfo info = new DurationInfo(log, "test"); Assert.assertTrue(info.value() >= 0); Thread.sleep(1000); info.finished(); Assert.assertTrue(info.value() > 0); info = new DurationInfo(log, true, "test format %s", "value"); Assert.assertEquals("test format value: duration 0:00.000s", info.toString()); info = new DurationInfo(log, false, "test format %s", "value"); Assert.assertEquals("test format value: duration 0:00.000s", info.toString()); }