TestMockMSModelFactory[] ftys = new TestMockMSModelFactory[n];
for (int i = 0; i < n; i++) {
String instanceName = "localhost_" + (12918 + i);
ftys[i] = new TestMockMSModelFactory();
participants[i] = new MockParticipant(_zkaddr, clusterName, instanceName);
participants[i].getStateMachineEngine().registerStateModelFactory(StateModelDefId.MasterSlave, ftys[i]);
participants[i].syncStart();
// wait for each participant to complete state transitions, so we have deterministic results
boolean result = false;