createResources();
int expectedResumes = expectedConnectionRecoveryAttempts + expectedChannelRecoveryAttempts;
final Waiter waiter = new Waiter();
waiter.expectResumes(expectedResumes);
config.withConnectionListeners(new DefaultConnectionListener() {
@Override
public void onChannelRecovery(Connection connection) {
waiter.resume();
}