public static boolean removeDisabledPartitions(InstanceConfig instanceConfig) {
    ZNRecord record = instanceConfig.getRecord();
    String disabledPartitionsKey = InstanceConfig.InstanceConfigProperty.HELIX_DISABLED_PARTITION.name();
    boolean listUpdated = record.getListFields().remove(disabledPartitionsKey) != null;
    boolean mapUpdated = record.getMapFields().remove(disabledPartitionsKey) != null;
    return listUpdated | mapUpdated;
  }
@Test
  public void testRemoveDisabledPartitions() {
    String instanceId = "Server_myInstance";
    InstanceConfig instanceConfig = new InstanceConfig(instanceId);
    assertTrue(instanceConfig.getDisabledPartitionsMap().isEmpty());
    assertFalse(HelixHelper.removeDisabledPartitions(instanceConfig));

    instanceConfig.setInstanceEnabledForPartition("myResource", "myPartition", false);
    assertFalse(instanceConfig.getDisabledPartitionsMap().isEmpty());
    assertTrue(HelixHelper.removeDisabledPartitions(instanceConfig));
    assertTrue(instanceConfig.getDisabledPartitionsMap().isEmpty());
  }