### Question:
Watchable implements Recyclable { public synchronized boolean deleteWatcher(Watcher<T> w) { return watchers.remove(w); } 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 testDeleteWatcher() { Watcher<Integer> watcher = mock(Watcher.class); assertTrue(watchable.addWatcher(watcher)); assertEquals(1, watchable.getNumWatchers()); assertTrue(watchable.deleteWatcher(watcher)); assertEquals(0, watchable.getNumWatchers()); watchable.notifyWatchers(Function.identity(), 123); verify(watcher, times(0)).update(anyInt()); }