@Override
    public Object getValue() {
        return lazyMetric == null ? null : lazyMetric.getValue();
    }
@Test
    public void getValue() {
        //Long
        LazyDelegatingGauge gauge = new LazyDelegatingGauge("bar", 99l);
        assertThat(gauge.getValue()).isEqualTo(99l);
        assertThat(gauge.getType()).isEqualTo(MetricType.GAUGE_NUMBER);

        //Double
        gauge = new LazyDelegatingGauge("bar", 99.0);
        assertThat(gauge.getValue()).isEqualTo(99.0);
        assertThat(gauge.getType()).isEqualTo(MetricType.GAUGE_NUMBER);

        //Boolean
        gauge = new LazyDelegatingGauge("bar", true);
        assertThat(gauge.getValue()).isEqualTo(true);
        assertThat(gauge.getType()).isEqualTo(MetricType.GAUGE_BOOLEAN);

        //Text
        gauge = new LazyDelegatingGauge("bar", "something");
        assertThat(gauge.getValue()).isEqualTo("something");
        assertThat(gauge.getType()).isEqualTo(MetricType.GAUGE_TEXT);

        //Ruby Hash
        gauge = new LazyDelegatingGauge("bar", RUBY_HASH);
        assertThat(gauge.getValue().toString()).isEqualTo(RUBY_HASH_AS_STRING);
        assertThat(gauge.getType()).isEqualTo(MetricType.GAUGE_RUBYHASH);

        //Ruby Timestamp
        gauge = new LazyDelegatingGauge("bar", RUBY_TIMESTAMP);
        assertThat(gauge.getValue()).isEqualTo(TIMESTAMP);
        assertThat(gauge.getType()).isEqualTo(MetricType.GAUGE_RUBYTIMESTAMP);

        //Unknown
        gauge = new LazyDelegatingGauge("bar", Collections.singleton("value"));
        assertThat(gauge.getValue()).isEqualTo(Collections.singleton("value"));
        assertThat(gauge.getValue()).isEqualTo(gauge.get());
        assertThat(gauge.getType()).isEqualTo(MetricType.GAUGE_UNKNOWN);

        //Null
        gauge = new LazyDelegatingGauge("bar");
        assertThat(gauge.getValue()).isNull();
        assertThat(gauge.get()).isNull();
        assertThat(gauge.getType()).isNull();

        assertThat(gauge.getName()).isNotEmpty();
    }