GlobalTransaction gtx = c.getCurrentTransaction(tx, true);
TransactionTable table = c.getTransactionTable();
OptimisticTransactionEntry entry = (OptimisticTransactionEntry) table.get(gtx);
assertNotNull(mgr.getTransaction());
MethodCall meth = entry.getModifications().get(0);
mgr.commit();
GlobalTransaction remoteGtx = new GlobalTransaction();
remoteGtx.setAddress(new DummyAddress());
//hack the method call to make it have the remote gtx
meth.getArgs()[0] = remoteGtx;
//call our remote method
MethodCall prepareMethod = MethodCallFactory.create(MethodDeclarations.optimisticPrepareMethod_id, remoteGtx, injectDataVersion(entry.getModifications()), null,
remoteGtx.getAddress(), Boolean.FALSE);
TestingUtil.getRemoteDelegate(c)._replicate(prepareMethod);
//our thread should be null
assertNull(mgr.getTransaction());