StorageManager storage = getStorage();
ReplicationManagerImpl manager = new ReplicationManagerImpl((ClientSessionFactoryInternal) locator.createSessionFactory(), factory);
manager.start();
Journal replicatedJournal = new ReplicatedJournal((byte)1, new FakeJournal(), manager);
replicatedJournal.appendPrepareRecord(1, new FakeData(), false);
replicatedJournal.appendAddRecord(1, (byte)1, new FakeData(), false);
replicatedJournal.appendUpdateRecord(1, (byte)2, new FakeData(), false);
replicatedJournal.appendDeleteRecord(1, false);
replicatedJournal.appendAddRecordTransactional(2, 2, (byte)1, new FakeData());
replicatedJournal.appendUpdateRecordTransactional(2, 2, (byte)2, new FakeData());
replicatedJournal.appendCommitRecord(2, false);
replicatedJournal.appendDeleteRecordTransactional(3, 4, new FakeData());
replicatedJournal.appendPrepareRecord(3, new FakeData(), false);
replicatedJournal.appendRollbackRecord(3, false);
blockOnReplication(storage, manager);
Assert.assertEquals(0, manager.getActiveTokens().size());
ServerMessage msg = new ServerMessageImpl(1, 1024);
SimpleString dummy = new SimpleString("dummy");
msg.setAddress(dummy);
replicatedJournal.appendAddRecordTransactional(23, 24, (byte)1, new FakeData());
PagedMessage pgmsg = new PagedMessageImpl(msg, new long[0]);
manager.pageWrite(pgmsg, 1);
manager.pageWrite(pgmsg, 2);
manager.pageWrite(pgmsg, 3);