@Test
    final void smokeTest() throws InterruptedException {
        final String metricName = "testMetric";
        metricApi.set(metricName, 1.0d, null);
        updater.gotData.await(10, TimeUnit.SECONDS);
        Bucket s = getUpdatedSnapshot();
        Collection<Entry<Point, UntypedMetric>> values = s.getValuesForMetric(metricName);
        assertEquals(1, values.size());
        Entry<Point, UntypedMetric> value = values.iterator().next();
        assertEquals(Point.emptyPoint(), value.getKey());
        assertEquals(1.0d, value.getValue().getLast(), 0.0d); // using number exactly expressible as doubles
        assertEquals(1L, value.getValue().getCount());
    }
Functional test for simple metric implementation.

@author Steinar Knutsen
container-core/src/test/java/com/yahoo/metrics/simple/MetricsTest.java