"validateMessageSequence: unexpected number of messages",
numExpectedMessages, messageQueue.size());
if (numExpectedMessages != 0) {
int expectedValue = offset;
for (byte[] message : messageQueue) {
MessageBuffer buf = new MessageBuffer(message);
int value = buf.getInt();
System.err.println(
toString() + " validating message sequence: " + value);
assertEquals("unexpected value", expectedValue, value);
expectedValue++;
}