jndi.bind("myAnimal", new Animal("Donkey", 17));
return jndi;
}
public void testSimpleExpressionOrPredicate() throws Exception {
Predicate predicate = SimpleLanguage.predicate("${header.bar} == 123");
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}");