@Test public void testReset() throws Exception { ManualClock clock = new ManualClock(0L); DurationTimer timer = new DurationTimer(MonitorConfig.builder("test").build(), clock); Stopwatch s = timer.start(); clock.set(10 * 1000L); assertEquals(10L, timer.getValue().longValue()); s.reset(); assertEquals(0L, timer.getValue().longValue()); clock.set(20 * 1000L); assertEquals(10L, timer.getValue().longValue()); } }