private void reconnect() {
final ArgumentCaptor<MessageListener> listenerCaptor = ArgumentCaptor.forClass(MessageListener.class);
verify(metaHandshakeChannel).addListener(listenerCaptor.capture());
MessageListener reconnectListener = listenerCaptor.getValue();
reconnectListener.onMessage(metaHandshakeChannel, Mockito.mock(Message.class));
}
private Message mockSubscribeMessge(String channelID, boolean successful) {
Message message = mock(Message.class);
when(message.get(Message.SUBSCRIPTION_FIELD)).thenReturn(channelID);