static boolean isTableUsingInstancePoolAndReplicaGroup(@Nonnull TableConfig tableConfig) {
    boolean status = true;
    Map<String, InstanceAssignmentConfig> instanceAssignmentConfigMap = tableConfig.getInstanceAssignmentConfigMap();
    if (instanceAssignmentConfigMap != null) {
      for (InstanceAssignmentConfig instanceAssignmentConfig : instanceAssignmentConfigMap.values()) {
        if (instanceAssignmentConfig != null) {
          status &= (instanceAssignmentConfig.getTagPoolConfig().isPoolBased()
              && instanceAssignmentConfig.getReplicaGroupPartitionConfig().isReplicaGroupBased());
        } else {
          status = false;
        }
      }
    } else {
      status = false;
    }

    return status;
  }
@Test
  public void testValidIGnRGOfflineTable() {
    InstanceAssignmentConfig config =
        new InstanceAssignmentConfig(new InstanceTagPoolConfig("DefaultTenant", true, 0, null), null,
            new InstanceReplicaGroupPartitionConfig(true, 0, 0, 0, 0, 0, false, null), null, false);

    TableConfig tableConfig =
        new TableConfig("table", TableType.OFFLINE.name(), new SegmentsValidationAndRetentionConfig(),
            new TenantConfig("DefaultTenant", "DefaultTenant", null), new IndexingConfig(), new TableCustomConfig(null),
            null, null, null, null, Map.of("OFFLINE", config), null, null, null, null, null, null, false, null, null,
            null);

    Assert.assertTrue(TableConfigUtils.isTableUsingInstancePoolAndReplicaGroup(tableConfig));
  }