final Exception expectedException = new Exception("Hello, I should be thrown on shutdown only!");
MockScheduledPollConsumer consumer = new MockScheduledPollConsumer(endpoint, expectedException);
consumer.setBackoffMultiplier(4);
consumer.setBackoffErrorThreshold(3);
consumer.setPollStrategy(new PollingConsumerPollStrategy() {
public boolean begin(Consumer consumer, Endpoint endpoint) {
return true;
}
public void commit(Consumer consumer, Endpoint endpoint, int polledMessages) {