MetricDto getMetricByUuid(String uuid) {
    return requireNonNull(metricsByUuids.get(uuid), () -> String.format("Metric with uuid %s not found", uuid));
  }
@Test
  public void getMetric_fails_if_metric_is_not_registered() {
    Collection<MetricDto> metrics = asList(METRIC_1);
    MeasureMatrix underTest = new MeasureMatrix(asList(PROJECT, FILE), metrics, new ArrayList<>());

    assertThatThrownBy(() -> underTest.getMetricByUuid(METRIC_2.getUuid()))
      .isInstanceOf(NullPointerException.class)
      .hasMessage("Metric with uuid " + METRIC_2.getUuid() + " not found");
  }