### Question:
SubTreeCache { public synchronized void cancelWatcher(Watcher watcher) { pendingWatchers.remove(watcher); } SubTreeCache(TreeProvider provider); synchronized List<String> getChildren(String path); synchronized void registerWatcher(Watcher watcher); synchronized void cancelWatcher(Watcher watcher); synchronized WatchGuard registerWatcherWithGuard(Watcher watcher);  }### Answer:
@Test public void testCancelation() throws Exception { TestWatch watch = setWatch(); readAssertChildren("/a/a", new String[]{"a", "b"}); cache.cancelWatcher(watch); tree.createNode("/a/a/c"); assertNotFired(watch); }