private void verifyDataNodeConfigs() {
    // verify that they are present in the property store and that the basic values match expectations
    String clusterName = CLUSTER_NAME_PREFIX + CLUSTER_NAME_IN_STATIC_CLUSTER_MAP;
    for (ZkInfo zkInfo : dcsToZkInfo.values()) {
      String dcName = zkInfo.getDcName();
      if (!activeDcSet.contains(dcName)) {
        continue;
      }
      ClusterMapConfig config = HelixBootstrapUpgradeUtil.getClusterMapConfig(clusterName, dcName, null);
      InstanceConfigToDataNodeConfigAdapter.Converter converter =
          new InstanceConfigToDataNodeConfigAdapter.Converter(config);
      try (DataNodeConfigSource source = new PropertyStoreToDataNodeConfigAdapter("localhost:" + zkInfo.getPort(),
          config)) {
        ZKHelixAdmin admin = new ZKHelixAdmin("localhost:" + zkInfo.getPort());
        Map<DataNodeId, Set<String>> dataNodeToReplicas = testPartitionLayout.getPartitionLayout()
            .getPartitions(null)
            .stream()
            .flatMap(partition -> partition.getReplicaIds().stream())
            .collect(Collectors.groupingBy(ReplicaId::getDataNodeId,
                Collectors.mapping(replica -> replica.getPartitionId().toPathString(), Collectors.toSet())));
        List<DataNode> expectedNodes = testHardwareLayout.getAllDataNodesFromDc(zkInfo.getDcName());
        for (DataNode expectedNode : expectedNodes) {
          String instanceName = getInstanceName(expectedNode);
          DataNodeConfig dataNodeConfig;
          if (dataNodeConfigSourceType == PROPERTY_STORE) {
            dataNodeConfig = source.get(instanceName);
          } else {
            dataNodeConfig = converter.convert(admin.getInstanceConfig(clusterName, instanceName));
          }
          assertNotNull("Config for " + instanceName + " not found", config);
          assertEquals("Unexpected instance name", instanceName, dataNodeConfig.getInstanceName());
          assertEquals("Unexpected host", expectedNode.getHostname(), dataNodeConfig.getHostName());
          assertEquals("Unexpected port", expectedNode.getPort(), dataNodeConfig.getPort());
          Set<String> expectedReplicas = dataNodeToReplicas.get(expectedNode);
          Set<String> replicasInConfig = dataNodeConfig.getDiskConfigs()
              .values()
              .stream()
              .flatMap(diskConfig -> diskConfig.getReplicaConfigs().keySet().stream())
              .collect(Collectors.toSet());
          assertEquals("Unexpected partitions in config", expectedReplicas, replicasInConfig);
        }
        admin.close();
      }
    }
  }
Verify that the number of resources in Helix is as expected.
@param hardwareLayout the {@link HardwareLayout} of the static clustermap.
@param expectedResourceCount the expected number of resources in Helix.
ambry-tools/src/integration-test/java/com/github/ambry/clustermap/HelixBootstrapUpgradeToolTest.java