ChangedChildStateRegistry { public boolean isAChangeRegistered() { return recordsDeleted || ! changedItemPms.isEmpty() || isDetailsChangeRegistered(); } ChangedChildStateRegistry(PmObject observedRootPm); void addDetailsPmHandler(MasterPmHandler detailsPmHandler); boolean isAChangeRegistered(); void clearChangedItems(); void onAddNewItem(PmObject newItemPm); void onDeleteItem(PmObject deletedItem); Collection<PmObject> getChangedItems(); List<PmObject> getAddedItems();  }
@Test public void testChangeValueOfItem1AndChangeItToItsOriginalValue() { testChangeValueOfItem1(); item1.setValue(null); assertEquals("After resetting the item to its original value it should be in state 'unchanged'.", false, item1.isPmValueChanged()); assertEquals("The registry should also reflect the unchanged state of the item.", false, registry.isAChangeRegistered()); }
@Test public void testClearChangesOnParentValueChange() { testAddItem1(); PmEventApi.firePmEvent(parent, PmEvent.VALUE_CHANGE); assertEquals("The registry should no longer report a change.", false, registry.isAChangeRegistered()); }