### Question:
PrometheusMetricsSystem implements ObservableMetricsSystem { @Override public void createGauge( final MetricCategory category, final String name, final String help, final DoubleSupplier valueSupplier) { final String metricName = convertToPrometheusName(category, name); if (isCategoryEnabled(category)) { final Collector collector = new CurrentValueCollector(metricName, help, valueSupplier); addCollectorUnchecked(category, collector); } } PrometheusMetricsSystem(
      final Set<MetricCategory> enabledCategories, final boolean timersEnabled); static ObservableMetricsSystem init(final MetricsConfiguration metricsConfiguration); @Override LabelledMetric<org.hyperledger.besu.plugin.services.metrics.Counter> createLabelledCounter(
      final MetricCategory category,
      final String name,
      final String help,
      final String... labelNames); @Override LabelledMetric<OperationTimer> createLabelledTimer(
      final MetricCategory category,
      final String name,
      final String help,
      final String... labelNames); @Override void createGauge(
      final MetricCategory category,
      final String name,
      final String help,
      final DoubleSupplier valueSupplier); void addCollector(final MetricCategory category, final Collector metric); @Override Stream<Observation> streamObservations(final MetricCategory category); @Override Stream<Observation> streamObservations(); String convertToPrometheusName(final MetricCategory category, final String name);  }### Answer:
@Test public void shouldNotAllowDuplicateGaugeCreation() { metricsSystem.createGauge(JVM, "myValue", "Help", () -> 7d); assertThatThrownBy(() -> metricsSystem.createGauge(JVM, "myValue", "Help", () -> 7d)) .isInstanceOf(IllegalArgumentException.class); }