void removeWatchers() {
        List<NamespaceWatcher> localEntries = Lists.newArrayList(entries);
        while (localEntries.size() > 0) {
            NamespaceWatcher watcher = localEntries.remove(0);
            if (entries.remove(watcher)) {
                try {
                    log.debug("Removing watcher for path: " + watcher.getUnfixedPath());
                    RemoveWatchesBuilderImpl builder = new RemoveWatchesBuilderImpl(client);
                    builder.internalRemoval(watcher, watcher.getUnfixedPath());
                } catch (Exception e) {
                    log.error("Could not remove watcher for path: " + watcher.getUnfixedPath());
                }
            }
        }
    }
@Test
    public void testSameWatcherDifferentKinds() throws Exception {
        CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
        try {
            client.start();
            WatcherRemovalFacade removerClient = (WatcherRemovalFacade) client.newWatcherRemoveCuratorFramework();
            Watcher watcher = new Watcher() {
                @Override
                public void process(WatchedEvent event) {
                    // NOP
                }
            };

            removerClient.create().creatingParentsIfNeeded().forPath("/a/b/c");
            removerClient.checkExists().usingWatcher(watcher).forPath("/a/b/c");
            removerClient.getData().usingWatcher(watcher).forPath("/a/b/c");
            removerClient.removeWatchers();
        } finally {
            TestCleanState.closeAndTestClean(client);
        }
    }