public void sample(double x) {
        sample(x, defaultPosition);
    }
@Test
    final void testSampleDouble() throws InterruptedException {
        final String metricName = "unitTestGauge";
        Gauge g = receiver.declareGauge(metricName);
        g.sample(1.0d);
        Bucket b = receiver.getSnapshot();
        final Map<String, List<Entry<Point, UntypedMetric>>> valuesByMetricName = b.getValuesByMetricName();
        assertEquals(1, valuesByMetricName.size());
        List<Entry<Point, UntypedMetric>> x = valuesByMetricName.get(metricName);
        assertEquals(1, x.size());
        assertEquals(Point.emptyPoint(), x.get(0).getKey());
        assertEquals(1L, x.get(0).getValue().getCount());
        assertEquals(1.0d, x.get(0).getValue().getLast(), 0.0d);
    }