DropwizardExportsProvider implements Provider<DropwizardExports> { @Override public DropwizardExports get() { return new DropwizardExports(metricRegistry); } @Inject  DropwizardExportsProvider(MetricRegistry metricRegistry); @Override DropwizardExports get();  }
@Test public void getReturnsDropwizardExportsWithDropwizardMetrics() throws Exception { final MetricRegistry registry = new MetricRegistry(); registry.histogram("test.histogram"); final DropwizardExports dropwizardExports = new DropwizardExports(registry); final List<Collector.MetricFamilySamples> samples = dropwizardExports.collect(); assertEquals(1, samples.size()); final Collector.MetricFamilySamples element = samples.get(0); assertEquals("test_histogram", element.name); assertEquals(Collector.Type.SUMMARY, element.type); }