### Question:
SwingUpdateManager { public synchronized boolean hasPendingUpdates() { if (disposed) { return false; } return requestTime != 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 testHasPendingUpdates() { manager.updateLater(); assertTrue("Should have pending updates after calling update, but before the work" + "has been done", manager.hasPendingUpdates()); waitForManager(); assertEquals("Expected only 1 callback", 1, runnableCalled); assertFalse("Still have pending updates after performing work", manager.hasPendingUpdates()); }