Gauges { public static Gauge<Double> ratioOf( final Supplier<? extends Number> numerator, final Supplier<? extends Number> denominator ) { return new RatioGauge() { @Override protected Ratio getRatio() { return Ratio.of( numerator.get().doubleValue(), denominator.get().doubleValue()); } }; } private  Gauges(); static Gauge<Double> ratioOf(
            final Supplier<? extends Number> numerator,
            final Supplier<? extends Number> denominator
    ); static MeteredRatioGauge ratioOf(Metered numerator, Metered denominator); static MeteredRatioGauge ratioOf(
            Metered numerator,
            Metered denominator,
            Function<Metered, Double> accessor
    );  }
@Test public void testRatio() throws Exception { final Gauge<Double> gauge = Gauges.ratioOf( () -> 1.0d, () -> 4.0d ); assertEquals((Double) 0.25d, gauge.getValue()); }