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

        DoubleGauge gauge = metricsRegistry.newDoubleGauge("foo");

        double actual = gauge.read();

        assertEquals(0, actual, 0.1);
    }