// two application messages plus two createSequence plus two
// terminateSequence
awaitMessages(6, 6);
MessageFlow mf = new MessageFlow(outRecorder.getOutboundMessages(), inRecorder.getInboundMessages());
mf.verifyMessages(6, true);
String[] expectedActions = new String[] {RMConstants.getCreateSequenceAction(),
GREETMEONEWAY_ACTION,
RMConstants.getTerminateSequenceAction(),
RMConstants.getCreateSequenceAction(),
GREETMEONEWAY_ACTION,
RMConstants.getTerminateSequenceAction()};
mf.verifyActions(expectedActions, true);
mf.verifyMessageNumbers(new String[] {null, "1", null, null, "1", null}, true);
mf.verifyLastMessage(new boolean[] {false, true, false, false, true, false}, true);
// createSequenceResponse message plus partial responses to
// greetMeOneWay and terminateSequence ||: 2
mf.verifyMessages(6, false);
expectedActions = new String[] {RMConstants.getCreateSequenceResponseAction(),
RMConstants.getSequenceAcknowledgmentAction(), null,
RMConstants.getCreateSequenceResponseAction(),
RMConstants.getSequenceAcknowledgmentAction(), null};
mf.verifyActions(expectedActions, false);
mf.verifyMessageNumbers(new String[] {null, null, null, null, null, null}, false);
mf.verifyLastMessage(new boolean[] {false, false, false, false, false, false}, false);
mf.verifyAcknowledgements(new boolean[] {false, true, false, false, true, false}, false);
}