@Override
  public JSONObject getSnapshot() {
    JSONObject snapshot = new JSONObject();
    snapshot.put(PARTITION_ID, partition);
    snapshot.put(PARTITION_WRITE_STATE, partitionState.name());
    snapshot.put(PARTITION_CLASS, partitionClass);
    JSONArray replicas = new JSONArray();
    for (ReplicaId replicaId : replicaIds) {
      replicas.put(replicaId.getSnapshot());
    }
    snapshot.put(PARTITION_REPLICAS, replicas);
    return snapshot;
  }
Resolve the partition's status based on its replica's statuses.
If any one replica of a partition is {@link ReplicaSealStatus#SEALED}, then the partition is READ_ONLY.
If all the replicas are {@link ReplicaSealStatus#NOT_SEALED}, then the partition is READ_WRITE.
Otherwise, the partition is PARTIAL_READ_WRITE.
ambry-test-utils/src/main/java/com/github/ambry/clustermap/MockPartitionId.java