@Test public void compareObjectsNoChanges() { TestPerson newPerson = SerializationUtils.clone(oldPerson); AcmDiff diff = diffService.compareObjects(oldPerson, newPerson); assertEquals(0, diff.getChangesAsList().size()); }
public AcmDiff compareObjects(Object oldObj, Object newObj) { Map<Object, List<AcmChange>> alreadyProcessed = new HashMap<>(); AcmObjectChange acmObjectChange = compareObjects(null, null, oldObj, newObj, alreadyProcessed); AcmDiff diff = new AcmObjectDiff(acmObjectChange, getObjectConverter()); return diff; }
AcmDiffService { public AcmDiff compareObjects(Object oldObj, Object newObj) { Map<Object, List<AcmChange>> alreadyProcessed = new HashMap<>(); AcmObjectChange acmObjectChange = compareObjects(null, null, oldObj, newObj, alreadyProcessed); AcmDiff diff = new AcmObjectDiff(acmObjectChange, getObjectConverter()); return diff; } }
AcmDiffService { public AcmDiff compareObjects(Object oldObj, Object newObj) { Map<Object, List<AcmChange>> alreadyProcessed = new HashMap<>(); AcmObjectChange acmObjectChange = compareObjects(null, null, oldObj, newObj, alreadyProcessed); AcmDiff diff = new AcmObjectDiff(acmObjectChange, getObjectConverter()); return diff; }  }
AcmDiffService { public AcmDiff compareObjects(Object oldObj, Object newObj) { Map<Object, List<AcmChange>> alreadyProcessed = new HashMap<>(); AcmObjectChange acmObjectChange = compareObjects(null, null, oldObj, newObj, alreadyProcessed); AcmDiff diff = new AcmObjectDiff(acmObjectChange, getObjectConverter()); return diff; }  void initConfigurationMap(); AcmDiff compareObjects(Object oldObj, Object newObj); AcmCollectionChange compareCollections(Collection oldCollection, Collection newCollection); ObjectConverter getObjectConverter(); void setObjectConverter(ObjectConverter objectConverter); String getJsonConfiguration(); void setJsonConfiguration(String jsonConfiguration); }
AcmDiffService { public AcmDiff compareObjects(Object oldObj, Object newObj) { Map<Object, List<AcmChange>> alreadyProcessed = new HashMap<>(); AcmObjectChange acmObjectChange = compareObjects(null, null, oldObj, newObj, alreadyProcessed); AcmDiff diff = new AcmObjectDiff(acmObjectChange, getObjectConverter()); return diff; }  void initConfigurationMap(); AcmDiff compareObjects(Object oldObj, Object newObj); AcmCollectionChange compareCollections(Collection oldCollection, Collection newCollection); ObjectConverter getObjectConverter(); void setObjectConverter(ObjectConverter objectConverter); String getJsonConfiguration(); void setJsonConfiguration(String jsonConfiguration);  }