// make a commit
insertAndAdd(points1);
RevCommit mainCommit = geogig.command(CommitOp.class).setMessage("Commit1").call();
// start the first transaction
GeogigTransaction transaction1 = geogig.command(TransactionBegin.class).call();
// perform a commit in the transaction
insertAndAdd(transaction1, points2);
RevCommit transaction1Commit = transaction1.command(CommitOp.class).setMessage("Commit2")
.call();
// Verify that the base repository is unchanged
Iterator<RevCommit> logs = geogig.command(LogOp.class).call();
assertEquals(mainCommit, logs.next());
assertFalse(logs.hasNext());
// Verify that the transaction has the commit
logs = transaction1.command(LogOp.class).call();
assertEquals(transaction1Commit, logs.next());
assertEquals(mainCommit, logs.next());
assertFalse(logs.hasNext());
// start the second transaction
GeogigTransaction transaction2 = geogig.command(TransactionBegin.class).call();
// perform a commit in the transaction
insertAndAdd(transaction2, points3);
RevCommit transaction2Commit = transaction2.command(CommitOp.class).setMessage("Commit3")
.call();
// Verify that the base repository is unchanged
logs = geogig.command(LogOp.class).call();
assertEquals(mainCommit, logs.next());
assertFalse(logs.hasNext());
// Verify that the transaction has the commit
logs = transaction2.command(LogOp.class).call();
assertEquals(transaction2Commit, logs.next());
assertEquals(mainCommit, logs.next());
assertFalse(logs.hasNext());
// Commit the first transaction