JmxReporterProvider implements Provider<JmxReporter> { @Override public JmxReporter get() { return JmxReporter.forRegistry(metricRegistry) .convertDurationsTo(configuration.getUnitDurations()) .convertRatesTo(configuration.getUnitRates()) .filter(new RegexMetricFilter(configuration.getIncludeMetrics())) .build(); } @Inject  JmxReporterProvider(MetricsJmxReporterConfiguration configuration, MetricRegistry metricRegistry); @Override JmxReporter get();  }
@Test public void get() throws Exception { final JmxReporterProvider provider = new JmxReporterProvider(new MetricsJmxReporterConfiguration(), new MetricRegistry()); final JmxReporter reporter = provider.get(); assertNotNull(reporter); }