### Question:
DropwizardApnsClientMetricsListener implements ApnsClientMetricsListener, MetricSet { @Override public Map<String, Metric> getMetrics() { return this.metrics.getMetrics(); } DropwizardApnsClientMetricsListener(); @Override void handleWriteFailure(final ApnsClient apnsClient, final long notificationId); @Override void handleNotificationSent(final ApnsClient apnsClient, final long notificationId); @Override void handleNotificationAccepted(final ApnsClient apnsClient, final long notificationId); @Override void handleNotificationRejected(final ApnsClient apnsClient, final long notificationId); @Override void handleConnectionAdded(final ApnsClient apnsClient); @Override void handleConnectionRemoved(final ApnsClient apnsClient); @Override void handleConnectionCreationFailed(final ApnsClient apnsClient); @Override Map<String, Metric> getMetrics(); static final String NOTIFICATION_TIMER_NAME; static final String WRITE_FAILURES_METER_NAME; static final String SENT_NOTIFICATIONS_METER_NAME; static final String ACCEPTED_NOTIFICATIONS_METER_NAME; static final String REJECTED_NOTIFICATIONS_METER_NAME; static final String OPEN_CONNECTIONS_GAUGE_NAME; static final String CONNECTION_FAILURES_METER_NAME; }### Answer:
@Test public void testGetMetrics() { final Map<String, Metric> metrics = this.listener.getMetrics(); assertTrue(metrics.get(DropwizardApnsClientMetricsListener.NOTIFICATION_TIMER_NAME) instanceof Timer); assertTrue(metrics.get(DropwizardApnsClientMetricsListener.WRITE_FAILURES_METER_NAME) instanceof Meter); assertTrue(metrics.get(DropwizardApnsClientMetricsListener.SENT_NOTIFICATIONS_METER_NAME) instanceof Meter); assertTrue(metrics.get(DropwizardApnsClientMetricsListener.ACCEPTED_NOTIFICATIONS_METER_NAME) instanceof Meter); assertTrue(metrics.get(DropwizardApnsClientMetricsListener.REJECTED_NOTIFICATIONS_METER_NAME) instanceof Meter); assertTrue(metrics.get(DropwizardApnsClientMetricsListener.OPEN_CONNECTIONS_GAUGE_NAME) instanceof Gauge); assertTrue(metrics.get(DropwizardApnsClientMetricsListener.CONNECTION_FAILURES_METER_NAME) instanceof Meter); }