public static StaticClusterManager getTestClusterMap(int partitionCount, int replicaCountPerDatacenter,
      long replicaCapacityInBytes, ClusterMapConfig clusterMapConfig) throws JSONException {

    TestUtils.TestHardwareLayout testHardwareLayout = new TestHardwareLayout("Alpha");
    PartitionLayout partitionLayout = new PartitionLayout(testHardwareLayout.getHardwareLayout(), clusterMapConfig);

    StaticClusterManager clusterMapManager = new StaticClusterManager(partitionLayout, null, new MetricRegistry());
    List<PartitionId> allocatedPartitions;

    allocatedPartitions = clusterMapManager.allocatePartitions(partitionCount, MockClusterMap.DEFAULT_PARTITION_CLASS,
        replicaCountPerDatacenter, replicaCapacityInBytes, true);
    assertEquals(allocatedPartitions.size(), 5);

    return clusterMapManager;
  }
Return the partition layout as a {@link JSONObject}
@param partitionClass the partition class that these partitions must belong to
@param partitionState the state of the newly created partitions
@return the partition layout as a {@link JSONObject}
@throws JSONException if there is an exception parsing or constructing JSON.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/TestUtils.java