Thread.sleep(45000);
//testing outgoing sequence reports
SequenceReport sequenceReport = SandeshaClient.getOutgoingSequenceReport(serviceClient);
assertTrue(sequenceReport.getCompletedMessages().contains(new Long(1)));
assertTrue(sequenceReport.getCompletedMessages().contains(new Long(2)));
assertEquals(sequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
assertEquals(sequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_OUT);
//testing incoming sequence reports
ArrayList incomingSequenceReports = SandeshaClient.getIncomingSequenceReports(configContext);
assertEquals(incomingSequenceReports.size(),1);
SequenceReport incomingSequenceReport = (SequenceReport) incomingSequenceReports.get(0);
assertEquals(incomingSequenceReport.getCompletedMessages().size(),2);
assertNotNull(incomingSequenceReport.getSequenceID());
assertEquals(incomingSequenceReport.getSequenceDirection(),SequenceReport.SEQUENCE_DIRECTION_IN);
assertEquals(incomingSequenceReport.getSequenceStatus(),SequenceReport.SEQUENCE_STATUS_TERMINATED);
assertNotNull(incomingSequenceReport.getInternalSequenceID());
assertEquals(incomingSequenceReport.getSequenceID(),incomingSequenceReport.getInternalSequenceID()); //for the incoming side, internalSequenceID==sequenceID
serviceClient.finalizeInvoke();
}