@Override
  public Set<String> getMetricKeys(QualityGate gate) {
    Set<String> metricKeys = new HashSet<>();
    metricKeys.add(CoreMetrics.NEW_LINES_KEY);
    for (Condition condition : gate.getConditions()) {
      metricKeys.add(condition.getMetricKey());
    }
    return metricKeys;
  }
@Test
  public void getMetricKeys_includes_metrics_from_qgate() {
    Set<String> metricKeys = ImmutableSet.of("foo", "bar", "baz");
    Set<Condition> conditions = metricKeys.stream().map(key -> {
      Condition condition = mock(Condition.class);
      when(condition.getMetricKey()).thenReturn(key);
      return condition;
    }).collect(Collectors.toSet());

    QualityGate gate = mock(QualityGate.class);
    when(gate.getConditions()).thenReturn(conditions);
    assertThat(underTest.getMetricKeys(gate)).containsAll(metricKeys);
  }