Condition condition = new EqualPropertiesBeanCondition(new String[]{"name", "address.street"});
assertTrue(condition.check(new Person("uri", "boness", 88, new Address("uri"))));
}
public void testCheck_WithNullInNestedPropertyPath() throws Exception {
Condition condition = new EqualPropertiesBeanCondition(new String[]{"name", "address.street"});
try {
condition.check(new Person("uri", "boness", 88)); // the address property here is null
fail("An InvalidPropertyException if the checked bean holds null in the nested property path");
} catch (InvalidPropertyException ipe) {
// expected
}
}