*/
public class CommitCommandTest extends BaseMongoMicroKernelTest {
@Test
public void initialCommit() throws Exception {
Commit commit = CommitBuilder.build("/", "+\"a\" : { \"b\" : {} , \"c\" : {} }", null);
CommitCommandNew command = new CommitCommandNew(getNodeStore(), commit);
Long revisionId = command.execute();
Assert.assertNotNull(revisionId);
MongoAssert.assertNodesExist(NodeBuilder.build(String.format(
"{ \"/#%1$s\" : { \"a#%1$s\" : { \"b#%1$s\" : {} , \"c#%1$s\" : {} } } }", revisionId)));
MongoAssert.assertCommitExists(commit);
MongoAssert.assertCommitContainsAffectedPaths(MongoUtil.fromMongoRepresentation(commit.getRevisionId()),
"/", "/a", "/a/b", "/a/c");
MongoAssert.assertHeadRevision(1);
MongoAssert.assertNextRevision(2);
}