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_whenAdhocInstallationProviderWithoutValue_shouldNotMapToMetric() {
    TestTelemetryAdhocBean provider = new TestTelemetryAdhocBean(Dimension.INSTALLATION, false); // Force the value so that nothing is returned

    Set<Metric> metrics = TelemetryMetricsMapper.mapFromDataProvider(provider);
    List<InstallationMetric> userMetrics = retrieveList(metrics);

    assertThat(userMetrics).isEmpty();
  }