@VisibleForTesting
    Set<? extends Watcher> getEntries() {
        return Sets.newHashSet(entries);
    }
@Test
    public void testResetFromWatcher() throws Exception {
        Timing timing = new Timing();
        CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
        try {
            client.start();

            final WatcherRemovalFacade removerClient = (WatcherRemovalFacade) client.newWatcherRemoveCuratorFramework();

            final CountDownLatch createdLatch = new CountDownLatch(1);
            final CountDownLatch deletedLatch = new CountDownLatch(1);
            Watcher watcher = new Watcher() {
                @Override
                public void process(WatchedEvent event) {
                    if (event.getType() == Event.EventType.NodeCreated) {
                        try {
                            removerClient.checkExists().usingWatcher(this).forPath("/yo");
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                        createdLatch.countDown();
                    } else if (event.getType() == Event.EventType.NodeDeleted) {
                        deletedLatch.countDown();
                    }
                }
            };

            removerClient.checkExists().usingWatcher(watcher).forPath("/yo");
            assertEquals(removerClient.getRemovalManager().getEntries().size(), 1);
            removerClient.create().forPath("/yo");

            assertTrue(timing.awaitLatch(createdLatch));
            assertEquals(removerClient.getRemovalManager().getEntries().size(), 1);

            removerClient.delete().forPath("/yo");

            assertTrue(timing.awaitLatch(deletedLatch));

            assertEquals(removerClient.getRemovalManager().getEntries().size(), 0);
        } finally {
            TestCleanState.closeAndTestClean(client);
        }
    }