JdbcTemplate jdbcTemplate = new JdbcTemplate(ds);
ProducerTemplate template = ctx.createProducerTemplate();
MockEndpoint mock = ctx.getEndpoint("mock:result", MockEndpoint.class);
mock.expectedMessageCount(1);
template.sendBody("direct:insert", new Object[]{10, "test", "test"});
mock.assertIsSatisfied();
try {
String projectName = jdbcTemplate.queryForObject("select project from projects where id = 10", String.class);
assertEquals("test", projectName);
} catch (EmptyResultDataAccessException e) {