### Question:
RepeatedTimer implements Describer { public void reset(final int timeoutMs) { this.lock.lock(); this.timeoutMs = timeoutMs; try { if (this.stopped) { return; } if (this.running) { schedule(); } } finally { this.lock.unlock(); } } RepeatedTimer(final String name, final int timeoutMs);  RepeatedTimer(final String name, final int timeoutMs, final Timer timer); int getTimeoutMs(); void run(); void runOnceNow(); void start(); void restart(); void reset(final int timeoutMs); void reset(); void destroy(); void stop(); @Override void describe(final Printer out); @Override String toString(); static final Logger LOG; }### Answer:
@Test public void testReset() throws Exception { this.timer.start(); assertEquals(50, this.timer.getTimeoutMs()); for (int i = 0; i < 10; i++) { Thread.sleep(80); this.timer.reset(); } assertEquals(10, this.timer.counter.get(), 3); this.timer.reset(100); for (int i = 0; i < 10; i++) { Thread.sleep(80); this.timer.reset(); } assertEquals(10, this.timer.counter.get(), 3); }