initialEmptyTxnId = db.commit(prevId, new HashMap<String,ApiBuffer>());
checkEmpty(initialEmptyTxnId);
HashMap<String,ApiBuffer> batch = new HashMap<String,ApiBuffer>();
ApiBuffer buffer = new ApiBuffer();
buffer.put("ID1", Util.literalSMap().p("name", "Joe") .p("gender", "m").p("age", 31));
buffer.put("ID2", Util.literalSMap().p("name", "Jill").p("gender", "f").p("age", 23));
batch.put("people", buffer);
twoInsertsTxnId = db.commit(initialEmptyTxnId, batch);
checkTwoInserts(twoInsertsTxnId);
checkEmpty(initialEmptyTxnId); // old rev should still appear empty
batch = new HashMap<String,ApiBuffer>();
buffer = new ApiBuffer();
buffer.getDeletions().add("ID1");
buffer.getDeletions().add("ID2");
batch.put("people", buffer);
System.out.println("---------");
long clearedTxnId = db.commit(twoInsertsTxnId, batch);
assertEquals(clearedTxnId, initialEmptyTxnId+2);
checkEmpty(clearedTxnId);