### Question:
DropwizardMetrics extends AbstractMetrics { @Override public Histogram histogram(String name) { com.codahale.metrics.Histogram histogram = new com.codahale.metrics.Histogram( reservoirFactory.newInstance(com.codahale.metrics.Histogram.class, name) ); return new DropwizardHistogram(metricRegistry.register(name, histogram)); } DropwizardMetrics(ConfigurationProperties configurationProperties,
                             MetricRegistry metricRegistry,
                             ReservoirFactory reservoirFactory,
                             MetricsLifeCycleCallback... callbacks);  DropwizardMetrics(ConfigurationProperties configurationProperties,
                             ReservoirFactory reservoirFactory,
                             MetricsLifeCycleCallback... callbacks); @Override Histogram histogram(String name); @Override Timer timer(String name); void start(); void stop(); static final MetricsFactory FACTORY; static final MetricsFactory UNIFORM_RESERVOIR_FACTORY; }### Answer:
@Test public void testHistogram() { DropwizardMetrics dropwizardMetrics = new DropwizardMetrics(configurationProperties, reservoirFactory); assertSame(configurationProperties, dropwizardMetrics.getConfigurationProperties()); when(reservoirFactory.newInstance(com.codahale.metrics.Histogram.class, "histo")).thenReturn(reservoir); Histogram histogram = dropwizardMetrics.histogram("histo"); verify(reservoirFactory, times(1)).newInstance(com.codahale.metrics.Histogram.class, "histo"); assertNotNull(histogram); }