public static Set<Metric> mapFromDataProvider(TelemetryDataProvider<?> provider) {
    switch (provider.getDimension()) {
      case INSTALLATION -> {
        return mapInstallationMetric(provider);
      } case PROJECT -> {
        return mapProjectMetric(provider);
      } case USER -> {
        return mapUserMetric(provider);
      } case LANGUAGE -> {
        return mapLanguageMetric(provider);
      } default -> throw new IllegalArgumentException("Dimension: " + provider.getDimension() + " not yet implemented.");
    }
  }
@Test
  void mapFromDataProvider_whenProjectProvider() {
    TelemetryDataProvider<String> provider = new TestTelemetryBean(Dimension.PROJECT);

    Set<Metric> metrics = TelemetryMetricsMapper.mapFromDataProvider(provider);
    List<ProjectMetric> list = retrieveList(metrics);

    assertThat(list)
      .extracting(ProjectMetric::getKey, ProjectMetric::getType, ProjectMetric::getProjectUuid, ProjectMetric::getValue, ProjectMetric::getGranularity)
      .containsExactlyInAnyOrder(
        expected()
      );
  }