@Override
  public void addMeasure(String metricKey, int value) {
    Metric metric = metricRepository.getByKey(metricKey);
    validateAddMeasure(metric);
    measureRepository.add(internalComponent, metric, newMeasureBuilder().create(value));
  }
@Test
  public void fail_with_IAE_when_add_measure_is_called_on_metric_not_in_output_list() {
    assertThatThrownBy(() -> {
      MeasureComputerContextImpl underTest = newContext(PROJECT_REF, NCLOC_KEY, INT_METRIC_KEY);
      underTest.addMeasure(DOUBLE_METRIC_KEY, 10);
    })
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("Only metrics in [int_metric_key] can be used to add measures. Metric 'double_metric_key' is not allowed.");
  }