FetchNodesForRevisionQuery query = new FetchNodesForRevisionQuery(mongoConnection, new String[] { "/", "/a",
"/a/b", "/a/c", "/a/d", "/a/b/e", "not_existing" }, thirdRevisionId);
List<NodeMongo> nodeMongos = query.execute();
List<Node> actuals = NodeMongo.toNode(nodeMongos);
Node expected = NodeBuilder
.build(String
.format("{ \"/#%1$s\" : { \"a#%3$s\" : { \"int\" : 1 , \"double\" : 0.123 , \"b#%3$s\" : { \"string\" : \"foo\" , \"e#%3$s\" : { \"array\" : [ 123, null, 123.456, \"for:bar\", true ] } } , \"c#%1$s\" : { \"bool\" : true }, \"d#%3$s\" : { \"null\" : null } } } }",
firstRevisionId, secondRevisionId,
thirdRevisionId));
Set<Node> expecteds = expected.getDescendants(true);
NodeAssert.assertEquals(expecteds, actuals);
}