}
@Test(enabled = true)
public void testModelPropertyChangeTracker() throws Exception {
final Model m = TestModelStubber.stubAddress(1);
final ModelChangeTracker changeTracker = new ModelChangeTracker();
for(final IModelProperty mp : m) {
mp.addPropertyChangeListener(changeTracker);
}
m.getModelProperty("emailAddress").setValue("changed email");
m.getModelProperty("address1").setValue("change address1");
final Model changed = changeTracker.generateChangeModel(m);
Assert.assertEquals(changed.size(), 4); // we always copy the id and version too (2 + 2)
}