@Override
    public long read() {
        return gaugeSource.read();
    }
@Test
    public void whenProbeThrowsException() {
        metricsRegistry.registerStaticProbe(this, "foo", MANDATORY,
                (LongProbeFunction) o -> {
                    throw new RuntimeException();
                });

        LongGauge gauge = metricsRegistry.newLongGauge("foo");

        long actual = gauge.read();

        assertEquals(0, actual);
    }