public static boolean isMirrorServerSetAssignment(TableConfig tableConfig,
      InstancePartitionsType instancePartitionsType) {
    // If the instance assignment config is not null and the partition selector is
    // MIRROR_SERVER_SET_PARTITION_SELECTOR,
    return tableConfig.getInstanceAssignmentConfigMap() != null
        && tableConfig.getInstanceAssignmentConfigMap().get(instancePartitionsType.toString()) != null
        && InstanceAssignmentConfigUtils.getInstanceAssignmentConfig(tableConfig, instancePartitionsType)
        .getPartitionSelector()
        == InstanceAssignmentConfig.PartitionSelector.MIRROR_SERVER_SET_PARTITION_SELECTOR;
  }
@Test
  public void testIsMirrorServerSetAssignment() {
    Map<String, InstanceAssignmentConfig> instanceAssignmentConfigMap = new HashMap<>();
    instanceAssignmentConfigMap.put(InstancePartitionsType.OFFLINE.name(),
        getInstanceAssignmentConfig(InstanceAssignmentConfig.PartitionSelector.MIRROR_SERVER_SET_PARTITION_SELECTOR));
    TableConfig tableConfig = new TableConfigBuilder(TableType.OFFLINE).setTableName("testTable")
        .setInstanceAssignmentConfigMap(instanceAssignmentConfigMap)
        .build();
    Assert.assertTrue(InstanceAssignmentConfigUtils.isMirrorServerSetAssignment(tableConfig,
        InstancePartitionsType.OFFLINE));
  }