protected int messageCount = 100;
public void testSendingLotsOfMessagesGetAggregatedToTheLatestMessage() throws Exception {
MockEndpoint resultEndpoint = resolveMandatoryEndpoint("mock:result", MockEndpoint.class);
resultEndpoint.expectedBodiesReceived("message:" + messageCount);
// lets send a large batch of messages
for (int i = 1; i <= messageCount; i++) {
String body = "message:" + i;
template.sendBodyAndHeader("direct:a", body, "cheese", 123);