ELExpressionParser extends UserExpressionParser { @Override public UserExpression parse(final String source) { Pair<UserExpression, String> parsed = ueParse(source.trim()); if (parsed.getSecond().length() == 0) { return parsed.getFirst(); } List<UserExpression> exprs = new LinkedList<UserExpression>(); exprs.add(parsed.getFirst()); do { parsed = ueParse(parsed.getSecond()); exprs.add(parsed.getFirst()); } while (parsed.getSecond().length() > 0); return new FirstValidExpression(exprs); } ELExpressionParser(); @Override void setConstant(final String name, final Object value); @Override void setFunction(final String object, final String name, final Method method); @Override UserExpression parse(final String source);  }
@Test(expectedExceptions = {IllegalArgumentException.class }) public void testInvalidExpression() { final ELExpressionParser parser = new ELExpressionParser(); parser.parse("Not a valid expression"); }