expression = SimpleLanguage.simple("${header.bar} == 124", boolean.class);
assertEquals(Boolean.FALSE, expression.evaluate(exchange, Object.class));
expression = SimpleLanguage.simple("${header.bar} == 123", Boolean.class);
assertEquals(Boolean.TRUE, expression.evaluate(exchange, Object.class));
expression = SimpleLanguage.simple("${header.bar} == 124", Boolean.class);
assertEquals(Boolean.FALSE, expression.evaluate(exchange, Object.class));
}
public void testResultType() throws Exception {
assertEquals(123, SimpleLanguage.simple("${header.bar}", int.class).evaluate(exchange, Object.class));
assertEquals("123", SimpleLanguage.simple("${header.bar}", String.class).evaluate(exchange, Object.class));