@Test(groups = "wso2.esb", description = "Tests small message in small number ~100") public void testLargeNumbers() throws Exception { int beforeLogSize = logViewer.getAllRemoteSystemLogs().length; OMElement response = null; for (int i = 0; i < 100; i++) { response = axis2Client.sendCustomQuoteRequest(getMainSequenceURL(), null, "MSFT" + symbol); Assert.assertNotNull(response); Assert.assertTrue( response.toString().contains("MSFT"), "Incorrect symbol in response. Could not find symbol MSFT .."); response = null; } LogEvent[] logs = logViewer.getAllRemoteSystemLogs(); int afterLogSize = logs.length; int forEachCount = 0; for (int i = (afterLogSize - beforeLogSize - 1); i >= 0; i--) { String message = logs[i].getMessage(); if (message.contains("foreach = in")) { if (!message.contains("MSFT")) { Assert.fail("Incorrect message entered ForEach scope"); } forEachCount++; } } Assert.assertEquals(forEachCount, 100, "Count of messages entered ForEach scope is incorrect"); }