}
@Test
public void testHandshakeListenersAreNotifiedBeforeConnectListeners() throws Exception
{
final BayeuxClient client = new BayeuxClient(cometdURL, new LongPollingTransport(null, httpClient));
final int sleep = 1000;
final AtomicBoolean handshaken = new AtomicBoolean();
client.getChannel(Channel.META_HANDSHAKE).addListener(new ClientSessionChannel.MessageListener()
{
public void onMessage(ClientSessionChannel channel, Message message)