template.sendBodyAndHeader("activemq:queue:inbox", "E", "uid", 222);
template.sendBodyAndHeader("activemq:queue:inbox", "D", "uid", 111);
// assert mock and wait for the message to be done
assertMockEndpointsSatisfied();
assertTrue("Should complete 3 messages", notify.matchesMockWaitTime());
// check that there is two messages in the database and JMS queue
assertEquals(2, jdbcTemplate.queryForInt("select count(*) from CAMEL_MESSAGEPROCESSED"));
assertEquals("DONE-D", consumer.receiveBody("activemq:queue:outbox", 3000));
assertEquals("DONE-E", consumer.receiveBody("activemq:queue:outbox", 3000));