private void checkCaseInsensitivityForPartitionSelectionHelper(ClusterMapUtils.PartitionSelectionHelper psh,
      boolean allPartitions, String partitionClass, Collection<? extends PartitionId> expected) {
    // case insensitivity check
    int halfwayPoint = partitionClass.length() / 2;
    String mixedCaseName =
        partitionClass.substring(0, halfwayPoint).toLowerCase() + partitionClass.substring(halfwayPoint).toUpperCase();
    String[] classesToTry = {partitionClass, partitionClass.toLowerCase(), partitionClass.toUpperCase(), mixedCaseName};
    for (String classToTry : classesToTry) {
      assertCollectionEquals("Partitions returned for " + classToTry + " not as expected", expected,
          allPartitions ? psh.getPartitions(classToTry) : psh.getWritablePartitions(classToTry));
    }
  }
Checks that the {@code partitionClass} is treated in a case insensitive way.
@param psh the {@link ClusterMapUtils.PartitionSelectionHelper} to use.
@param allPartitions if {@code true}, calls {@link ClusterMapUtils.PartitionSelectionHelper#getPartitions(String)}.
                     If {@code false}, calls
                     calls {@link ClusterMapUtils.PartitionSelectionHelper#getWritablePartitions(String)}.
@param partitionClass the partition class to test against
@param expected the expected partitions to be returned for the partition class
ambry-clustermap/src/test/java/com/github/ambry/clustermap/ClusterMapUtilsTest.java