@Override
  @CheckForNull
  public Measure getMeasure(String metric) {
    validateInputMetric(metric);
    Optional<org.sonar.ce.task.projectanalysis.measure.Measure> measure = measureRepository.getRawMeasure(internalComponent, metricRepository.getByKey(metric));
    if (measure.isPresent()) {
      return new MeasureImpl(measure.get());
    }
    return null;
  }
@Test
  public void fail_with_IAE_when_get_measure_is_called_on_metric_not_in_input_list() {
    assertThatThrownBy(() -> {
      MeasureComputerContextImpl underTest = newContext(PROJECT_REF, "another metric", "debt");
      underTest.getMeasure(NCLOC_KEY);
    })
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("Only metrics in [another metric] can be used to load measures");
  }