evaluateScript("cometd.subscribe('/echo', function(message) { ++msgCount; publishLatch.countDown(); });");
Assert.assertTrue(subscribeLatch.await(5000));
// The server receives an event and sends it to the client via the long poll
ackService.emit("test acknowledgement");
Assert.assertTrue(publishLatch.await(5000));
inAckId = get("inAckId");
Number outAckId = get("outAckId");
Assert.assertTrue(inAckId.intValue() >= outAckId.intValue());
Number msgCount = get("msgCount");