@Test
  public void helixClusterGetMinActiveReplicas() throws Exception {
    assumeTrue(!useComposite && !overrideEnabled);
    HelixClusterManager helixClusterManager = (HelixClusterManager) clusterManager;
    HelixClusterManager.HelixClusterManagerQueryHelper clusterHelper = helixClusterManager.new HelixClusterManagerQueryHelper();
    verifyInitialClusterChanges(helixClusterManager, helixCluster, new String[]{localDc});


    PartitionId partitionId = clusterHelper.getPartitions().iterator().next();
    List<String> resourceNames = helixCluster.getResources(localDc);
    String resourceName = resourceNames.get(0);
    String tag = "TAG_100000";
    IdealState idealState = helixCluster.getResourceIdealState(resourceName, localDc);
    idealState.setInstanceGroupTag(tag);
    idealState.setMinActiveReplicas(2);
    helixCluster.refreshIdealState();

    int minActiveReplicaConfig = clusterHelper.getMinActiveReplicas(partitionId);
    assertEquals(idealState.getMinActiveReplicas(), minActiveReplicaConfig);
  }
Test for {@link HelixClusterManager#getRandomFullyWritablePartition(String, List)}.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/HelixClusterManagerTest.java