public boolean appliesTo(Component project, @Nullable MetricEvaluationResult metricEvaluationResult) {
    return metricEvaluationResult != null
      && metricEvaluationResult.evaluationResult.level() != Measure.Level.OK
      && METRICS_TO_IGNORE_ON_SMALL_CHANGESETS.contains(metricEvaluationResult.condition.getMetric().getKey())
      && config.getConfiguration().getBoolean(CoreProperties.QUALITY_GATE_IGNORE_SMALL_CHANGES).orElse(true)
      && isSmallChangeset(project);
  }
@Test
  public void should_not_change_issue_related_metrics() {
    QualityGateMeasuresStep.MetricEvaluationResult metricEvaluationResult = generateEvaluationResult(NEW_BUGS_KEY, ERROR);
    Component project = generateNewRootProject();
    measureRepository.addRawMeasure(PROJECT_REF, CoreMetrics.NEW_LINES_KEY, newMeasureBuilder().create(19));

    boolean result = underTest.appliesTo(project, metricEvaluationResult);

    assertThat(result).isFalse();
  }