ref.set(pingInfo);
latch.countDown();
}
};
Session session = startClient(startServer(null), clientSessionFrameListener);
PingResultInfo pingResultInfo = session.ping(new PingInfo(5, TimeUnit.SECONDS));
Assert.assertEquals(1, pingResultInfo.getPingId() % 2);
Assert.assertTrue(latch.await(5, TimeUnit.SECONDS));
PingResultInfo pongInfo = ref.get();
Assert.assertNotNull(pongInfo);