assertTrue(predicate.matches(exchange));
predicate = SimpleLanguage.predicate("${header.bar} == 124");
assertFalse(predicate.matches(exchange));
Expression expression = SimpleLanguage.expression("${body}");
assertEquals("<hello id='m123'>world!</hello>", expression.evaluate(exchange, String.class));
expression = SimpleLanguage.simple("${body}");
assertEquals("<hello id='m123'>world!</hello>", expression.evaluate(exchange, String.class));
expression = SimpleLanguage.simple("${body}", String.class);
assertEquals("<hello id='m123'>world!</hello>", expression.evaluate(exchange, String.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));
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));
}