private ReplicaId createMockReplicaId(String partitionIdString, Class<? extends ReplicaId> replicaClass,
      Class<? extends PartitionId> partitionClass) {
    ReplicaId replicaId = Mockito.mock(replicaClass);
    PartitionId partitionId = Mockito.mock(partitionClass);
    when(partitionId.toPathString()).thenReturn(partitionIdString);
    when(replicaId.getPartitionId()).thenReturn(partitionId);
    return replicaId;
  }
Deep copy a {@link DataNodeConfig}.
@param dataNodeConfig {@link DataNodeConfig} to copy
@return {@link InstanceConfig} of given data node.
ambry-clustermap/src/test/java/com/github/ambry/clustermap/HelixParticipantTest.java