mgr.begin();
Transaction tx = mgr.getTransaction();
assertEquals(0, cache.getTransactionTable().getNumGlobalTransactions());
assertEquals(0, cache.getTransactionTable().getNumLocalTransactions());
SamplePojo pojo = new SamplePojo(21, "test");
cache.put("/one/two", "key1", pojo);
mgr.suspend();
assertEquals(1, cache.getTransactionTable().getNumGlobalTransactions());
assertEquals(1, cache.getTransactionTable().getNumLocalTransactions());
GlobalTransaction gtx = cache.getCurrentTransaction(tx, true);
TransactionTable table = cache.getTransactionTable();
OptimisticTransactionContext entry = (OptimisticTransactionContext) table
.get(gtx);
assertEquals(3, entry.getTransactionWorkSpace().getNodes().size());
assertNull(mgr.getTransaction());
mgr.begin();
SamplePojo pojo2 = new SamplePojo(22, "test2");
cache2.put("/one/two", "key1", pojo2);
mgr.commit();