verify(mockConnection).sendMessage(OUTGOING_SUBSCRIBE_MESSAGE);
}
@Test
public void testDelayedSubscriptionThatFailsToAuthorizeNotifiesListenerAndDoesNotAttemptToSubscribe() {
AuthorizationFailureException exception = new AuthorizationFailureException(
"Unable to contact auth server");
when(mockConnection.getState()).thenReturn(ConnectionState.DISCONNECTED);
when(mockPrivateChannel.toSubscribeMessage()).thenThrow(exception);
channelManager.subscribeTo(mockPrivateChannel,