### Question:
SwingUpdateManager { public synchronized void stop() { if (disposed) { return; } timer.stop(); requestTime = NONE; bufferingStartTime = NONE; } SwingUpdateManager(Runnable r);  SwingUpdateManager(int minDelay, Runnable r);  SwingUpdateManager(int minDelay, int maxDelay, Runnable r);  SwingUpdateManager(int minDelay, int maxDelay, String name, Runnable r); synchronized void update(); synchronized void updateLater(); void updateNow(); synchronized void stop(); synchronized boolean hasPendingUpdates(); synchronized boolean isBusy(); synchronized void dispose(); synchronized boolean isDisposed(); @Override String toString(); String toStringDebug(); static final int DEFAULT_MAX_DELAY; }### Answer:
@Test public void testStop() { manager.updateLater(); manager.stop(); waitForSwing(); assertTrue(!manager.isBusy()); assertEquals("Did not expect the callback after stop()", 0, runnableCalled); runnableCalled = 0; manager.update(); waitForManager(); assertEquals("Expected only 1 callback", 1, runnableCalled); }