ResourceDeclaration invocation = mockChannel.channelHandler.consumerDeclarations.get("test-tag");
final ConsumerDelegate consumerDelegate = (ConsumerDelegate) invocation.args[invocation.args.length - 1];
new Thread() {
public void run() {
try {
for (; deliveryTag.get() <= 100000 && consume.get(); deliveryTag.incrementAndGet()) {
consumerDelegate.handleDelivery("test-tag", new Envelope(deliveryTag.get(), false, "x",
"#"), null, ("foo-" + deliveryTag).getBytes());
Thread.sleep(5);
}
} catch (Exception e) {