private void verifyGetRandomWritablePartition(ClusterMapUtils.PartitionSelectionHelper psh,
      Set<MockPartitionId> allPartitionIds, String classBeingTested,
      Set<MockPartitionId> expectedReturnForClassBeingTested, String localDc) {
    assertInCollection("Random partition returned not as expected", allPartitionIds,
        psh.getRandomWritablePartition(null, null));
    if (localDc == null || localDc.isEmpty()) {
      assertNull("Partitions returned not as expected", psh.getRandomWritablePartition(classBeingTested, null));
    } else {
      assertInCollection("Random partition returned not as expected", expectedReturnForClassBeingTested,
          psh.getRandomWritablePartition(classBeingTested, null));
    }
  }
Verifies that the values returned for
{@link ClusterMapUtils.PartitionSelectionHelper#getRandomWritablePartition(String, List)} is correct.
@param psh the {@link ClusterMapUtils.PartitionSelectionHelper} instance to use.
@param allPartitionIds all the partitions that are in clustermap
@param classBeingTested the partition class being tested
@param expectedReturnForClassBeingTested the list of partitions that can expected to be returned for
                                            {@code classBeingTested}.
@param localDc the local dc name.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/ClusterMapUtilsTest.java