public Set<Metric> getMetrics() {
    return metrics;
  }
@Test
  public void should_not_crash_on_null_metrics_from_faulty_plugins() {
    Metrics faultyMetrics = () -> null;
    Metrics okMetrics = new FakeMetrics();

    List<Metric> metrics = metrics(okMetrics, faultyMetrics);
    metrics.removeAll(SENSOR_METRICS_WITHOUT_METRIC_PLUGIN);

    assertThat(metrics).isEqualTo(okMetrics.getMetrics());
  }