### Question:
RuntimeGaugeSet implements MetricSet { public Map<String, Metric> getMetrics() { return ImmutableMap.<String, Metric>of( "uptime", new Gauge<Long>() { public Long getValue() { return bean.getUptime(); } } ); }  Map<String, Metric> getMetrics();  }### Answer:
@Test public void testUptimeRetrieval() { RuntimeGaugeSet gauge = new RuntimeGaugeSet(); Map<String, Metric> metrics = gauge.getMetrics(); assertThat(metrics).containsKey("uptime"); assertThat(metrics.get("uptime")).isNotNull().isInstanceOf(Gauge.class); assertThat(((Gauge<Long>) metrics.get("uptime")).getValue()).isGreaterThan(0); }