ReporterUtils { public static ScheduledReporter createSlf4jReporter( MetricRegistry metricRegistry, Map<String, Object> config) { String loggerName = (String) config.getOrDefault("logger", "metrics:reporter"); return Slf4jReporter.forRegistry(metricRegistry) .convertRatesTo(getRatesUnit(config)) .convertDurationsTo(getDurationUnit(config)) .outputTo(LoggerFactory.getLogger(loggerName)) .build(); } private  ReporterUtils(); static ScheduledReporter createConsoleReporter(
      MetricRegistry metricRegistry, Map<String, Object> config); static ScheduledReporter createCsvReporter(
      MetricRegistry metricRegistry, Map<String, Object> config); static ScheduledReporter createSlf4jReporter(
      MetricRegistry metricRegistry, Map<String, Object> config);  }
@Test public void testCreateSlf4jReporter() { ScheduledReporter reporter = ReporterUtils.createSlf4jReporter(registry, new HashMap<String, Object>()); assertNotNull(reporter); }