public void setReplicaState(ReplicaId replicaId, ReplicaState state) {
    replicaAndState.computeIfPresent(replicaId, (k, v) -> state);
    MockReplicaId r = (MockReplicaId) replicaId;
    r.setReplicaState(state);
  }
Set state of certain replica for this partition.
@param replicaId the {@link ReplicaId} to use.
@param state the {@link ReplicaState} to set.
ambry-test-utils/src/main/java/com/github/ambry/clustermap/MockPartitionId.java