cache3.getConfiguration().setSyncRollbackPhase(syncCommitRollback);
TransactionManager mgr1 = cache1.getTransactionManager();
TransactionManager mgr2 = cache2.getTransactionManager();
assertTrue(cache3.getTransactionManager() instanceof NotifyingTransactionManager);
NotifyingTransactionManager mgr3 = (NotifyingTransactionManager) cache3.getTransactionManager();
mgr3.setCache(cache3);
assertSame(mgr1, mgr2);
assertNotSame(mgr1, mgr3);
assertNotSame(mgr2, mgr3);
assertTrue(mgr1 instanceof DummyTransactionManager);
assertTrue(mgr2 instanceof DummyTransactionManager);
ReplicationListener cacheLister2 = ReplicationListener.getReplicationListener(cache2);
ReplicationListener cacheLister3 = ReplicationListener.getReplicationListener(cache3);
cacheLister2.expect(PutKeyValueCommand.class);
cacheLister3.expect(PutKeyValueCommand.class);
cache1.put("/test", "key", "value");
cacheLister2.waitForReplicationToOccur();
cacheLister3.waitForReplicationToOccur();
assertEquals("value", cache1.get("/test", "key"));
assertEquals("value", cache2.get("/test", "key"));
assertEquals("value", cache3.get("/test", "key"));
mgr3.setNotification(new TestNotification(abortBeforeCompletion));
cacheLister2.expectWithTx(PutKeyValueCommand.class);
cacheLister3.expectWithTx(PutKeyValueCommand.class);
mgr1.begin();
cache1.put("/test", "key", "value2");