RecursiveDelete { public RecursiveDelete(NodeStore nodeStore, CommitHook commitHook, Supplier<CommitInfo> commitInfo) { this.nodeStore = nodeStore; this.commitHook = commitHook; this.commitInfo = commitInfo; } RecursiveDelete(NodeStore nodeStore, CommitHook commitHook,
                           Supplier<CommitInfo> commitInfo); void run(Iterable<String> paths); void run(String path); int getNumRemoved(); int getMergeCount(); void setBatchSize(int batchSize); int getMaxRemoveCount(); void setMaxRemoveCount(int maxRemoveCount); int getSleepPerBatch(); void setSleepPerBatch(int sleepPerBatch);  }
@Test public void recursiveDelete() throws Exception{ int actualCount = createSubtree(10000); assertEquals(actualCount, getSubtreeCount(getNode(nodeStore.getRoot(), testNodePath))); RecursiveDelete rd = new RecursiveDelete(nodeStore, EmptyHook.INSTANCE, () -> CommitInfo.EMPTY); rd.setBatchSize(100); rd.run(testNodePath); assertEquals(actualCount, rd.getNumRemoved()); assertFalse(getNode(nodeStore.getRoot(), testNodePath).exists()); System.out.println(rd.getMergeCount()); System.out.println(actualCount); }