assertNotNull(mgr.retrieve("MsgId1"));
}
public void testFind() {
try {
mgr.insert(new SenderBean("MsgId2", "Key2", false , 1001 , "TmpSeqId2", 1002));
mgr.insert(new SenderBean("MsgId3", "Key3", false , 1001 , "TmpSeqId2", 1003));
SenderBean target = new SenderBean();
target.setInternalSequenceID("TmpSeqId2");
Iterator iterator = mgr.find(target).iterator();
SenderBean tmp = (SenderBean) iterator.next();
if (tmp.getMessageID().equals("MsgId2")) {
tmp = (SenderBean) iterator.next();
assertTrue(tmp.getMessageID().equals("MsgId3"));
} else {
tmp = (SenderBean) iterator.next();
assertTrue(tmp.getMessageID().equals("MsgId2"));
}
} catch (SandeshaException e) {
fail("should not throw an exception");