public void assertExpression(String expression, Object expected) throws Exception {
Expression exp = engine.createExpression(expression);
Object value = exp.evaluate(context);
if (expected instanceof BigDecimal) {
JexlArithmetic jexla = engine.getArithmetic();
assertTrue("expression: " + expression, ((BigDecimal) expected).compareTo(jexla.toBigDecimal(value)) == 0);
} else {
assertEquals("expression: " + expression, expected, value);
}
}