### Question:
MicrometerApnsClientMetricsListener implements ApnsClientMetricsListener { @Override public void handleConnectionCreationFailed(final ApnsClient apnsClient) { this.connectionFailures.increment(); } MicrometerApnsClientMetricsListener(final MeterRegistry meterRegistry, final List<String> tags);  MicrometerApnsClientMetricsListener(final MeterRegistry meterRegistry, final String... tagKeysAndValues);  MicrometerApnsClientMetricsListener(final MeterRegistry meterRegistry, final Iterable<Tag> tags); @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); static final String NOTIFICATION_TIMER_NAME; static final String WRITE_FAILURES_COUNTER_NAME; static final String SENT_NOTIFICATIONS_COUNTER_NAME; static final String ACCEPTED_NOTIFICATIONS_COUNTER_NAME; static final String REJECTED_NOTIFICATIONS_COUNTER_NAME; static final String OPEN_CONNECTIONS_GAUGE_NAME; static final String CONNECTION_FAILURES_COUNTER_NAME; }### Answer:
@Test public void testHandleConnectionCreationFailed() { final Counter connectionFailures = this.meterRegistry.get(MicrometerApnsClientMetricsListener.CONNECTION_FAILURES_COUNTER_NAME).counter(); assertEquals(0, (int) connectionFailures.count()); this.listener.handleConnectionCreationFailed(null); assertEquals(1, (int) connectionFailures.count()); }