### Question:
GaugeDouble extends Metric { GaugeDouble(final MetricRegistry registry, final String id, final int maxCardinality) { super(registry, id, maxCardinality); } GaugeDouble(final MetricRegistry registry, final String id, final int maxCardinality); void set(final double value, final String... tags);  }### Answer:
@Test public void testGaugeDouble() { MetricRegistry metricRegistry = new MetricRegistry(); GaugeDouble gaugeDouble = metricRegistry.gaugeDouble("cpuUsage"); new Expectations(gaugeDouble) {{ gaugeDouble.emit(anyLong, (String[]) any); }}; double v1 = 98.99; gaugeDouble.set(v1); new Verifications() {{ String[] tags; gaugeDouble.emit(Double.doubleToRawLongBits(v1), tags = withCapture()); assertEquals(0, tags.length); }}; double v2 = -10.505; gaugeDouble.set(v2, "TEST-key", "test-v1"); new Verifications() {{ String[] tags; gaugeDouble.emit(Double.doubleToRawLongBits(v2), tags = withCapture()); assertThat(tags, arrayContaining("TEST-key", "test-v1")); }}; }