@Override
    public Metric get() {
        return metric;
    }
@Test
    void requireThatThreadLocalConsumersAreProvided() throws Exception {
        AtomicInteger cnt = new AtomicInteger(0);
        final MetricProvider metricProvider = MetricProviders.newInstance(MetricConsumerFactories.newCounter(cnt));
        assertEquals(0, cnt.get());
        metricProvider.get().add("foo", 6, null); // need to call on Metric to instantiate MetricConsumer
        assertEquals(1, cnt.get());
        metricProvider.get().add("bar", 9, null);
        assertEquals(1, cnt.get());

        ExecutorService executor = Executors.newSingleThreadExecutor();
        assertTrue(executor.submit(new MetricTask(metricProvider)).get(60, TimeUnit.SECONDS));
        assertEquals(2, cnt.get());
        assertTrue(executor.submit(new MetricTask(metricProvider)).get(60, TimeUnit.SECONDS));
        assertEquals(2, cnt.get());
    }