"Producer sent %d messages but the consumer received %d",
POOL_SIZE, m1ConsumerImpl.getQueue().size()), m1ConsumerImpl
.getQueue().size() == 10);
for (int x = 0; x < POOL_SIZE; x++) {
EletronicMsg message = m1ConsumerImpl.getQueue().poll();
Assert.assertTrue(
String.format(
"The producer sent %d messages in ascending order, the consumer should receive in the same order but the message %d arrived in wrong order",
POOL_SIZE, x), message.equals(new EletronicMsg(
String.format("message %d", x))));
}
}