class AllowlistPersistor {

  @VisibleForTesting
  void removeExistingConfigItem(final ALLOWLIST_TYPE allowlistType) throws IOException {
    List<String> otherConfigItems =
        existingConfigItems(configurationFile.toPath())
            .entrySet()
            .parallelStream()
            .filter(listType -> !listType.getKey().equals(allowlistType))
            .map(keyVal -> valueListToTomlArray(keyVal.getKey(), keyVal.getValue()))
            .collect(Collectors.toList());

    Files.write(
        configurationFile.toPath(),
        otherConfigItems,
        StandardOpenOption.WRITE,
        StandardOpenOption.TRUNCATE_EXISTING);
  }

  public  AllowlistPersistor(final String configurationFile);

}