### Question:
RepeatedTimer implements Describer { public void destroy() { boolean invokeDestroyed = false; this.lock.lock(); try { if (this.destroyed) { return; } this.destroyed = true; if (!this.running) { invokeDestroyed = true; } if (this.stopped) { return; } this.stopped = true; if (this.timeout != null) { if (this.timeout.cancel()) { invokeDestroyed = true; this.running = false; } this.timeout = null; } } finally { this.lock.unlock(); this.timer.stop(); if (invokeDestroyed) { onDestroy(); } } } 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 testDestroy() throws Exception { this.timer.start(); assertEquals(0, this.timer.destroyed.get()); Thread.sleep(100); this.timer.destroy(); assertEquals(1, this.timer.destroyed.get()); }