zk3 = mockZooKeeperFactory.getLastZooKeeper();
zk3.triggerConnect();
// Create ZkLeaderElection1
mockExecutor1 = new MockExecutor();
variablePayload1 = new VariablePayload(testData1);
mockLeaderElectionCallback1 = new MockLeaderElectionCallback();
zkLeaderElection1 =
new ZkLeaderElection(
mockZkConnectionManager1,
electionRoot,
candidateBaseName,
variablePayload1,
mockLeaderElectionCallback1,
mockExecutor1
);
// Create ZkLeaderElection2
mockExecutor2 = new MockExecutor();
variablePayload2 = new VariablePayload(testData2);
mockLeaderElectionCallback2 = new MockLeaderElectionCallback();
zkLeaderElection2 =
new ZkLeaderElection(
mockZkConnectionManager2,
electionRoot,
candidateBaseName,
variablePayload2,
mockLeaderElectionCallback2,
mockExecutor2
);
// Create ZkLeaderElection3
mockExecutor3 = new MockExecutor();
variablePayload3 = new VariablePayload(testData3);
mockLeaderElectionCallback3 = new MockLeaderElectionCallback();
zkLeaderElection3 =
new ZkLeaderElection(
mockZkConnectionManager3,
electionRoot,