@Test
public void should_call_handler_when_connected() {

    Consumer<InetSocketAddress> handler = mock(Consumer.class);
    tcpMessaging.setConnectHandler(handler);
    tcpMessaging.onConnected(LOCAL_1_5683);
    verify(handler).accept(eq(LOCAL_1_5683));
    tcpMessaging.onConnected(LOCAL_5683);
    verify(handler).accept(eq(LOCAL_5683));
}