### Question:
Watchable implements Recyclable { public synchronized void deleteWatchers() { watchers.clear(); } Watchable(Recycler<Watcher<T>> recycler); synchronized boolean addWatcher(Watcher<T> w); synchronized boolean deleteWatcher(Watcher<T> w); void notifyWatchers(Function<R, T> valueFn, R value); synchronized void deleteWatchers(); @Override synchronized void recycle();  }### Answer:
@Test @SuppressWarnings("unchecked") public void testDeleteWatchers() { Watcher<Integer> watcher1 = mock(Watcher.class); Watcher<Integer> watcher2 = mock(Watcher.class); assertTrue(watchable.addWatcher(watcher1)); assertTrue(watchable.addWatcher(watcher2)); assertEquals(2, watchable.getNumWatchers()); watchable.deleteWatchers(); assertEquals(0, watchable.getNumWatchers()); watchable.notifyWatchers(Function.identity(), 123); verify(watcher1, times(0)).update(anyInt()); verify(watcher2, times(0)).update(anyInt()); }