Service service = new Service("cat", "unreachable_service");
URI uid = createMessages(1, service, store);
int maxRedeliveryCount = store.getMaxRedeliverCount();
for (int i=0; i<maxRedeliveryCount; i++) {
store.redeliver(uid);
Message message = store.getMessage(uid);
//the message should have a redeliveryCount of i+1
assertNotNull(message);
Integer deliverCount = (Integer) message.getProperties().getProperty(RedeliverStore.DELIVER_COUNT);
assertEquals(deliverCount, i+1);