OrCondition extends AbstractCondition { public boolean matches(RenderContext context) { if (subConditions == null || subConditions.isEmpty()) { throw new IllegalStateException("Missing sub conditions."); } for (Condition condition : subConditions) { if (condition.matches(context)) { return true; } } return false; } OrCondition(ConditionFactory conditionFactory);  OrCondition(ConditionFactory conditionFactory,
			Condition... subConditions);  OrCondition(ConditionFactory conditionFactory,
			List<Condition> subConditions); String getName(); List<Condition> getSubConditions(); void setSubConditions(List<Condition> subConditions); 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(); OrCondition or = new OrCondition(conditionFactory); or.matches(context); }