Condition condition = new PropertyBeanCondition("age", new StringCondition());
assertFalse(condition.check(new Person("Uri", "Boness", 88)));
}
public void testCheck_WhenBeanMissingThePropoerty() throws Exception {
Condition condition = new PropertyBeanCondition("missingProperty", new StringCondition());
try {
assertFalse(condition.check(new Person("Uri", "Boness", 88)));
fail("An InvalidPropertyException must be thrown if the checked bean doesn't have the checked property");
} catch (InvalidPropertyException ipe) {
// expected
}
}