private void generateConfigs(boolean segmentedLog, boolean updateInstanceConfig, boolean removeUnexpectedDirs,
      int numSegment, boolean removeDirectoryAndRestart, boolean restoreDiskAvailability) {
    List<com.github.ambry.utils.TestUtils.ZkInfo> zkInfoList = new ArrayList<>();
    zkInfoList.add(new com.github.ambry.utils.TestUtils.ZkInfo(null, "DC0", (byte) 0, 2199, false));
    JSONObject zkJson = constructZkLayoutJSON(zkInfoList);
    Properties properties = new Properties();
    properties.put("disk.manager.enable.segment.pooling", "true");
    properties.put("store.compaction.triggers", "Periodic,Admin");
    properties.put("store.replica.status.delegate.enable", "true");
    properties.put("store.set.local.partition.state.enabled", "true");
    properties.setProperty(StoreConfig.storeRemoveUnexpectedDirsInFullAutoName, String.valueOf(removeUnexpectedDirs));
    properties.setProperty("clustermap.host.name", "localhost");
    properties.setProperty("clustermap.port", "2200");
    properties.setProperty("clustermap.cluster.name", CLUSTER_NAME);
    properties.setProperty("clustermap.datacenter.name", "DC0");
    properties.setProperty("clustermap.dcs.zk.connect.strings", zkJson.toString(2));
    properties.setProperty("clustermap.update.datanode.info", Boolean.toString(updateInstanceConfig));
    // By default, there are 3 disks(mount paths) created for each data node. In order to surpass 0.9 threshold, all
    // disks have to fail.
    properties.setProperty(StoreConfig.storeThresholdOfDiskFailuresToTerminateName, "0.9");
    if (segmentedLog) {
      long replicaCapacity = clusterMap.getAllPartitionIds(null).get(0).getReplicaIds().get(0).getCapacityInBytes();
      properties.put("store.segment.size.in.bytes", Long.toString(replicaCapacity / numSegment));
    }
    properties.setProperty(StoreConfig.storeRemoveDirectoryAndRestartBlobStoreName,
        String.valueOf(removeDirectoryAndRestart));
    properties.setProperty(StoreConfig.storeRestoreUnavailableDiskInFullAutoName,
        String.valueOf(restoreDiskAvailability));
    VerifiableProperties vProps = new VerifiableProperties(properties);
    diskManagerConfig = new DiskManagerConfig(vProps);
    storeConfig = new StoreConfig(vProps);
    //System.out.println("The store config is " + storeConfig.storeReshuffleDisksOnReorder);
    clusterMapConfig = new ClusterMapConfig(vProps);
  }
Generates {@link StoreConfig} and {@link DiskManagerConfig} for use in tests.
@param segmentedLog {@code true} to set a segment capacity lower than total store capacity
@param updateInstanceConfig whether to update InstanceConfig in Helix
@param removeUnexpectedDirs {@code true} to remove unexpectedd directories when current node is in FULL AUTO
@param numSegment the number of log segment files to create
@parem removeDirectoryAndRestart {@code true} to remove directory of a blob store and restart it when it failes to start
@param restoreDiskAvailability {@code true} to restore disk's availability when unavailable disk is fixed.
ambry-store/src/test/java/com/github/ambry/store/StorageManagerTest.java