@Override
  public List<ClusterParticipant> getClusterParticipants() {
    if (clusterParticipants == null) {
      ClusterParticipant clusterParticipant = new ClusterParticipant() {
        private final Map<StateModelListenerType, PartitionStateChangeListener>
            registeredPartitionStateChangeListeners = new HashMap<>();

        @Override
        public void participateAndBlockStateTransition(List<AmbryStatsReport> ambryHealthReports, AccountStatsStore accountStatsStore,
            Callback<AggregatedAccountStorageStats> callback) {
          for (String partitionName : partitionLeadershipList) {
            for (PartitionStateChangeListener partitionStateChangeListener : registeredPartitionStateChangeListeners.values()) {
              partitionStateChangeListener.onPartitionBecomeLeaderFromStandby(partitionName);
            }
          }
        }

        @Override
        public void unblockStateTransition() {
        }

        @Override
        public void close() {

        }

        @Override
        public boolean setReplicaSealedState(ReplicaId replicaId, ReplicaSealStatus replicaSealStatus) {
          if (!(replicaId instanceof MockReplicaId)) {
            throw new IllegalArgumentException("Not MockReplicaId");
          }
          MockReplicaId mockReplicaId = (MockReplicaId) replicaId;
          mockReplicaId.setReplicaSealStatus(replicaSealStatus);
          return true;
        }

        @Override
        public boolean setReplicaStoppedState(List<ReplicaId> replicaIds, boolean markStop) {
          for (ReplicaId replicaId : replicaIds) {
            if (!(replicaId instanceof MockReplicaId)) {
              throw new IllegalArgumentException("Not MockReplicaId");
            }
            MockReplicaId mockReplicaId = (MockReplicaId) replicaId;
            mockReplicaId.markReplicaDownStatus(markStop);
          }
          return true;
        }

        @Override
        public List<String> getSealedReplicas() {
          return new ArrayList<>();
        }

        @Override
        public List<String> getPartiallySealedReplicas() {
          return new ArrayList<>();
        }

        @Override
        public List<String> getStoppedReplicas() {
          return new ArrayList<>();
        }

        @Override
        public void registerPartitionStateChangeListener(StateModelListenerType listenerType,
            PartitionStateChangeListener partitionStateChangeListener) {
          registeredPartitionStateChangeListeners.put(listenerType, partitionStateChangeListener);
        }

        @Override
        public Map<StateModelListenerType, PartitionStateChangeListener> getPartitionStateChangeListeners() {
          return registeredPartitionStateChangeListeners;
        }

        @Override
        public ReplicaSyncUpManager getReplicaSyncUpManager() {
          return null;
        }

        @Override
        public boolean updateDataNodeInfoInCluster(ReplicaId replicaId, boolean shouldExist) {
          return false;
        }
      };
      clusterParticipants = new ArrayList<>(Collections.singleton(clusterParticipant));
    }
    return clusterParticipants;
  }
Create a {@link MockClusterAgentsFactory} object from the given {@code clustermap}.
@param mockClusterMap {@link ClusterMap} object.
ambry-test-utils/src/main/java/com/github/ambry/clustermap/MockClusterAgentsFactory.java