public void testBeanLanguageInvalidOGNL() throws Exception {
try {
template.requestBody("direct:start", "World", String.class);
fail("Should have thrown exception");
} catch (CamelExecutionException e) {
RuntimeBeanExpressionException rbee = assertIsInstanceOf(RuntimeBeanExpressionException.class, e.getCause());
ExpressionIllegalSyntaxException cause = assertIsInstanceOf(ExpressionIllegalSyntaxException.class, rbee.getCause());
assertEquals("Illegal syntax: getOther[xx", cause.getMessage());
assertEquals("getOther[xx", cause.getExpression());
}
}