r.acknowledge(ackm, null);
try { r.acknowledge(ackm, null); } catch(IllegalStateException e) {  log.info(e);  }
   public void testRecoverableChannel_27_race() throws Throwable   {      if (!queue.isRecoverable())      {         // we test only recoverable channels now         return;      }      // add an NACKING receiver to the channel      SimpleReceiver r = new SimpleReceiver("NackingReceiver", SimpleReceiver.ACCEPTING);      r.setImmediateAsynchronousAcknowledgment(true);      assertTrue(queue.add(r));      MessageReference ref = createReference(0, true, "payload");      SimpleDeliveryObserver observer = new SimpleDeliveryObserver();      // non-transacted send, reliable message, one message      Delivery delivery = queue.handle(observer, ref, null);      assertTrue(delivery.isDone());      // the receiver should have returned a "done" delivery      assertTrue(queue.browse().isEmpty());      List messages = r.getMessages();      assertEquals(1, messages.size());      Message ackm = (Message)messages.get(0);      assertEquals(0, ackm.getMessageID());      // an extra acknowledgment should be discarded            //TODO - why should it be discarded?      //If you acknowledge twice surely this is a usage error?      r.acknowledge(ackm, null);      assertTrue(queue.browse().isEmpty());   }