private void checkPartitionReplicas(String dcName, String clusterName, int resourceId, String partition,
      Set<String> expectedInstances) {
    ZkInfo zkInfo = dcsToZkInfo.get(dcName);
    ZKHelixAdmin admin = new ZKHelixAdmin("localhost:" + zkInfo.getPort());
    IdealState idealState = admin.getResourceIdealState(clusterName, String.valueOf(resourceId));
    if (expectedInstances == null) {
      assertNull(idealState.getPreferenceList(partition));
    } else {
      assertEquals(expectedInstances, new HashSet<>(idealState.getPreferenceList(partition)));
    }
    admin.close();
  }
Test update partitions that belong to FULL AUTO resource
@throws Exception
ambry-tools/src/integration-test/java/com/github/ambry/clustermap/HelixBootstrapUpgradeToolTest.java