@Test
public void reportDoubleGaugeValuesUsingCustomFormatter() throws Exception {

    DecimalFormat formatter = new DecimalFormat("##.##########", DecimalFormatSymbols.getInstance(Locale.US));
    try (GraphiteReporter graphiteReporter = GraphiteReporter.forRegistry(registry)
            .withClock(clock)
            .prefixedWith("prefix")
            .convertRatesTo(TimeUnit.SECONDS)
            .convertDurationsTo(TimeUnit.MILLISECONDS)
            .filter(MetricFilter.ALL)
            .disabledMetricAttributes(Collections.emptySet())
            .withFloatingPointFormatter(formatter::format)
            .build(graphite)) {
        reportGaugeValue(graphiteReporter, 0.000045322);
        verifyGraphiteSentCorrectMetricValue("prefix.gauge", "0.000045322", timestamp);
        verifyNoMoreInteractions(graphite);
    }
}