int numReplies = pingClient.pingAndWaitForReply(msg, numPings, timeout, null);
// Check that all the replies were received and log a fail if they were not.
if (numReplies < numPings)
{
tc.completeTest(false, 0);
}
// Remove the chained message listener from the ping producer.
pingClient.removeChainedMessageListener();