FetchValidCommitsQuery query = new FetchValidCommitsQuery(mongoConnection,
String.valueOf(Integer.MAX_VALUE) /*maxRevisionId*/);
List<CommitMongo> commits = query.execute();
CommitMongo commit0 = commits.get(0);
SimpleNodeScenario scenario = new SimpleNodeScenario(mongoConnection);
scenario.create();
commits = query.execute();
CommitMongo commit1 = commits.get(0);
assertTrue(commit0.getRevisionId() < commit1.getRevisionId());
int numberOfChildren = 3;
scenario.addChildrenToA(numberOfChildren);
commits = query.execute();
CommitMongo commit2 = commits.get(0);
assertTrue(commit1.getRevisionId() < commit2.getRevisionId());
}