RevisionsCommand implements Command { private void reset(RevisionsOptions options, Closer closer) throws IOException { VersionGarbageCollector gc = bootstrapVGC(options, closer); System.out.println("resetting recommendations and statistics"); gc.reset(); }  @Override void execute(String... args);  }
@Test public void reset() throws Exception { ns.getVersionGarbageCollector().gc(1, TimeUnit.HOURS); Document doc = ns.getDocumentStore().find(Collection.SETTINGS, "versionGC"); assertNotNull(doc); ns.dispose(); String output = captureSystemOut(new RevisionsCmd("reset")); assertTrue(output.contains("resetting recommendations and statistics")); MongoConnection c = connectionFactory.getConnection(); assertNotNull(c); ns = builderProvider.newBuilder() .setMongoDB(c.getMongoClient(), c.getDBName()).getNodeStore(); doc = ns.getDocumentStore().find(Collection.SETTINGS, "versionGC"); assertNull(doc); }