* Description: execute 100 times - message received by callback<br>
* Expectation: passes
*/
@Test
public void t15_100AsynchronousMessages() throws Exception {
SCMPClnExecuteCall clnExecuteCall = new SCMPClnExecuteCall(this.requester, TestConstants.sesServerName1, this.sessionId);
clnExecuteCall.setMessageInfo(TestConstants.echoCmd);
clnExecuteCall.setRequestBody(TestConstants.pangram);
ExecuteCallback callback = new ExecuteCallback();
for (int i = 0; i < 100; i++) {
callback.messageReceived = false;
clnExecuteCall.invoke(callback, 3000);
while (callback.messageReceived == false)
;
Assert.assertEquals(TestConstants.pangram, callback.reply.getBody());
Assert.assertEquals(SCMPBodyType.TEXT.getValue(), callback.reply.getHeader(SCMPHeaderAttributeKey.BODY_TYPE));
Assert.assertEquals(SCMPMsgType.CLN_EXECUTE.getValue(), callback.reply.getMessageType());