}
SandeshaReport rmReport = SandeshaClient.getSandeshaReport(configContext);
SequenceReport sequence1Report = null;
SequenceReport sequence2Report = null;
Iterator iterator = rmReport.getOutgoingSequenceList().iterator();
while (iterator.hasNext()) {
String sequenceID = (String) iterator.next();
String internalSequenceID = rmReport.getInternalSequenceIdOfOutSequence(sequenceID);
if (internalSequenceID.indexOf(sequenceKey1)>=0) {
sequence1Report = SandeshaClient.getOutgoingSequenceReport(to,sequenceKey1,configContext);
} else if (internalSequenceID.indexOf(sequenceKey2)>=0){
sequence2Report = SandeshaClient.getOutgoingSequenceReport(to,sequenceKey2,configContext);
}
}
assertNotNull(sequence1Report);
assertNotNull(sequence2Report);
assertEquals(sequence1Report.getCompletedMessages().size(),2);
assertEquals(sequence2Report.getCompletedMessages().size(),1);
assertEquals(sequence1Report.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
assertEquals(sequence2Report.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_ESTABLISHED);
serviceClient.finalizeInvoke();
}