state.add(ref);
state.addReference(ref);
   public void testNonRecoverableState_remove_4() throws Throwable   {      if (state.isRecoverable())      {         // only non-recoverable state is tested now         return;      }      if (!state.acceptReliableMessages())      {         // only state that accepts reliable messages is tested now         return;      }      for(int i = 0; i < NUMBER_OF_MESSAGES; i++)      {         MessageReference ref =               ms.reference(MessageFactory.createMessage("message" + i, false, "payload" + i));         state.add(ref);      }      for(int i = 0; i < NUMBER_OF_MESSAGES; i++)      {         MessageReference ref = state.removeFirst();         assertEquals("message" + i, ref.getMessageID());      }      assertNull(state.removeFirst());      log.info("ok");   }