JexlNumericFunctions implements ExpressionContextVisitor { public String add(Object... values) { double result = Arrays.stream(values).mapToDouble(FunctionHandler::getDouble).sum(); return Double.toString(result); }  @Override void visit(JexlContext context); String mod(Object num, Object mod); String add(Object... values); String subtract(Object... values); String random(Object omin, Object omax); String random(Object omax); String randomPositiveWhole(Object olength); String randomNegativeWhole(Object olength); String randomPositiveFloat(Object owhole, Object odecimal); String randomNegativeFloat(Object owhole, Object odecimal); String toInt(String num);  }
@Test @Tag(TestGroups.FUNCTIONAL) public void testAdd() { String sum = variables.evaluate("#{numericFunctions.add(4, 8)}"); assertNotNull(sum); assertEquals("12.0", sum); sum = variables.evaluate("#{numericFunctions.add(two_int, three_float)}"); assertNotNull(sum); assertEquals("5.0", sum); }