ExpressionCondition extends AbstractCondition { @Override public boolean matches(RenderContext context) { if (expression == null) { throw new IllegalStateException("Missing expression statement."); } ExpressionEvaluator evaluator = context.getExpressionEvaluator(); Object result = evaluator.evaluate(expression, context.getExpressionContext()); if (result != null) { return "true".equalsIgnoreCase(result.toString().trim()); } else { return false; } } ExpressionCondition(ConditionFactory conditionFactory);  ExpressionCondition(ConditionFactory conditionFactory,
			String expression); String getName(); String getExpression(); void setExpression(String expression); @Override boolean matches(RenderContext context); @Override Serializable saveState(); @Override void restoreState(Serializable state); @Override void saveSettings(HierarchicalConfiguration configuration); @Override void restoreSettings(HierarchicalConfiguration configuration); @Override String toString(); static final String NAME; }
@Test(expected = IllegalStateException.class) public void testEmptyCondition() { RenderContext context = createDummyRenderContext(); ExpressionCondition expression = new ExpressionCondition( conditionFactory); expression.matches(context); }