### Question:
SmackLoggingConnectionListener implements ConnectionListener { @Override public void connected(XMPPConnection xmppConnection) { connectedCounter.inc(); }  @Override void connected(XMPPConnection xmppConnection); @Override void authenticated(XMPPConnection xmppConnection); @Override void reconnectionSuccessful(); @Override void reconnectionFailed(Exception e); @Override void reconnectingIn(int seconds); @Override void connectionClosedOnError(Exception e); @Override void connectionClosed();  }### Answer:
@Test public void testConnected() throws Exception { uut.connected(null); assertEquals(1L, ((Counter) METRICS.getMetrics().get("notifications.gcm.connected")).getCount()); }