SimpleReceiver receiver = new SimpleReceiver("ACKING", SimpleReceiver.ACKING); for(int i = 0; i < NUMBER_OF_MESSAGES; i++) { assertTrue(channel.redeliver(receiver)); assertEquals(1, receiver.getMessages().size()); assertEquals("message" + i, ((Message)receiver.getMessages().get(0)).getMessageID()); receiver.clear(); }  assertFalse(channel.redeliver(receiver));  log.info("ok");
   public void testNonRecoverableChannel_2() throws Exception   {      if (channel.isRecoverable())      {         // we test only non-recoverable channels now         return;      }      // the channel has no receivers      assertFalse(channel.iterator().hasNext());      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();      Message[] messages = new Message[NUMBER_OF_MESSAGES];      for(int i = 0; i < NUMBER_OF_MESSAGES; i++)      {         messages[i] = MessageFactory.createMessage("message" + i, false, "payload" + i);         // non-transacted send, non-reliable message, multiple messages         Delivery delivery = channel.handle(observer, messages[i], null);         assertTrue(delivery.isDone());      }      List stored = channel.browse();      assertEqualSets(messages, stored);   }