@Override
  public Iterable<Measure> getChildrenMeasures(String metric) {
    validateInputMetric(metric);
    return () -> internalComponent.getChildren().stream()
      .map(new ComponentToMeasure(metricRepository.getByKey(metric)))
      .map(ToMeasureAPI.INSTANCE)
      .filter(Objects::nonNull)
      .iterator();
  }
@Test
  public void fail_with_IAE_when_get_children_measures_is_called_on_metric_not_in_input_list() {
    assertThatThrownBy(() -> {
      MeasureComputerContextImpl underTest = newContext(PROJECT_REF, "another metric", "debt");
      underTest.getChildrenMeasures(NCLOC_KEY);
    })
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage("Only metrics in [another metric] can be used to load measures");
  }