Object object = instance;
for (int i = 0; i < getMethods.size() - 1; i++) {
object = getMethods.get(i).invoke(object);
+ if (object == null) {
+ return;
+ }
}
setMethod.invoke(object, new Object[] { value });
} catch (final InvocationTargetException e) {
Address address2 = new Address("Other street", 12345);
addressProperty.setValue(address2);
Assert.assertEquals("Other street", streetProperty.getValue());
+
+ Address address3 = null;
+ addressProperty.setValue(address3);
+ Assert.assertEquals(null, addressProperty.getValue());
+ streetProperty.setValue("Ruukinkatu");
+ Assert.assertEquals(null, streetProperty.getValue());
}
@Test