InfluxDbReporter extends ScheduledReporter { public static Builder forRegistry(MetricRegistry registry) { return new Builder(registry); } private  InfluxDbReporter(
        final MetricRegistry registry,
        final InfluxDbSender influxDb,
        final Map<String, String> tags,
        final TimeUnit rateUnit,
        final TimeUnit durationUnit,
        final MetricFilter filter,
        final boolean skipIdleMetrics,
        final boolean groupGauges,
        final Set<String> includeTimerFields,
        final Set<String> includeMeterFields,
        final Map<String, Pattern> measurementMappings,
        final Transformer tagsTransformer
    ); static Builder forRegistry(MetricRegistry registry); @Override void report(
        final SortedMap<String, Gauge> gauges,
        final SortedMap<String, Counter> counters,
        final SortedMap<String, Histogram> histograms,
        final SortedMap<String, Meter> meters,
        final SortedMap<String, Timer> timers);  }
@Test(expected = RuntimeException.class) public void shouldThrowRuntimeExceptionWhenIncorrectMeasurementRegex() { Map<String, String> measurementMappings = new HashMap<String, String>(); measurementMappings.put("health", ".**.*"); InfluxDbReporter .forRegistry(registry) .measurementMappings(measurementMappings) .build(influxDb); }