Set<String> getWritablePartitions() {
    Set<String> healthyWritablePartitions = new HashSet<>();
    for (Map.Entry<String, Set<String>> entry : partitionToInstances.entrySet()) {
      if (!partitionToPartitionStates.get(entry.getKey()).equals(PartitionState.READ_ONLY)) {
        boolean up = true;
        for (String instance : entry.getValue()) {
          if (!getUpInstances().contains(instance)) {
            up = false;
            break;
          }
        }
        if (up) {
          healthyWritablePartitions.add(entry.getKey());
        }
      }
    }
    return healthyWritablePartitions;
  }
@return all writable partitions registered via this Helix admin.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/MockHelixAdmin.java