@Override
public Object answer(InvocationOnMock invocation) throws Throwable {
Consumer cons = (Consumer) invocation.getArguments()[6];
consumers.add(cons);
cons.handleConsumeOk(String.valueOf(consumerTag.getAndIncrement()));
latch.countDown();
return null;
}
}).when(channel).basicConsume(anyString(), anyBoolean(), anyString(), anyBoolean(), anyBoolean(), anyMap(), any(Consumer.class));
}