@Override
    public Number getMetricValue() {
        long currentCount = counter.getCount();
        long difference = currentCount - lastReportCount;
        currentReportCount = currentCount;
        return difference;
    }
@Test
    void testGetMetricValue() {
        final Counter backingCounter = new SimpleCounter();
        final DCounter counter =
                new DCounter(
                        backingCounter, "counter", "localhost", Collections.emptyList(), () -> 0);

        // sane initial state
        assertThat(counter.getMetricValue()).isEqualTo(0L);
        counter.ackReport();
        assertThat(counter.getMetricValue()).isEqualTo(0L);

        // value is compared against initial state 0
        backingCounter.inc(10);
        assertThat(counter.getMetricValue()).isEqualTo(10L);

        // last value was not acked, should still be compared against initial state 0
        backingCounter.inc(10);
        assertThat(counter.getMetricValue()).isEqualTo(20L);

        // last value (20) acked, now target of comparison
        counter.ackReport();
        assertThat(counter.getMetricValue()).isEqualTo(0L);

        // we now compare against the acked value
        backingCounter.inc(10);
        assertThat(counter.getMetricValue()).isEqualTo(10L);

        // properly handle decrements
        backingCounter.dec(10);
        assertThat(counter.getMetricValue()).isEqualTo(0L);
    }