mgr.delete("CreateSeqMsgId1");
assertNull(mgr.retrieve("CreateSeqMsgId1"));
}
public void testFind() throws SandeshaStorageException {
RMSBean createSeqBean1 = new RMSBean ();
createSeqBean1.setInternalSequenceID("TmpSeqId1");
createSeqBean1.setCreateSeqMsgID("CreateSeqMsgId1");
createSeqBean1.setSequenceID("SeqId1");
RMSBean createSeqBean2 = new RMSBean ();
createSeqBean2.setInternalSequenceID("TmpSeqId1");
createSeqBean2.setCreateSeqMsgID("CreateSeqMsgId2");
createSeqBean2.setSequenceID("SeqId2");
mgr.insert(createSeqBean1);
mgr.insert(createSeqBean2);
RMSBean target = new RMSBean();
target.setInternalSequenceID("TmpSeqId1");
Iterator iter = mgr.find(target).iterator();
RMSBean tmp = (RMSBean) iter.next();
if (tmp.getCreateSeqMsgID().equals("CreateSeqMsgId1")) {
tmp = (RMSBean) iter.next();
assertTrue(tmp.getCreateSeqMsgID().equals("CreateSeqMsgId2"));
} else {
tmp = (RMSBean) iter.next();
assertTrue(tmp.getCreateSeqMsgID().equals("CreateSeqMsgId1"));
}
}