public static List<String> withRemovedMetricAlias(Collection<String> metrics) {
    if (metrics.contains(REMOVED_METRIC)) {
      Set<String> newMetrics = new HashSet<>(metrics);
      newMetrics.remove(REMOVED_METRIC);
      newMetrics.add(DEPRECATED_METRIC_REPLACEMENT);
      return newMetrics.stream().toList();
    } else {
      return new ArrayList<>(metrics);
    }
  }
@Test
  void withRemovedMetricAlias_whenListContainsAccepted_shouldReturnListWithAccepted() {
    List<String> coreMetrics = List.of("accepted_issues", "blocker_violations", "critical_violations");

    List<String> upToDateMetrics = RemovedMetricConverter.withRemovedMetricAlias(coreMetrics);

    assertThat(upToDateMetrics).containsExactlyInAnyOrder("accepted_issues", "blocker_violations", "critical_violations");
  }