@Test public void overwrite_ParentCourt() { oldCourt.setParentCourt(newCourt); newCourt.setParentCourt(null); commonCourtOverwriter.overwrite(oldCourt, newCourt); assertEquals(newCourt, oldCourt.getParentCourt()); assertNull(newCourt.getParentCourt()); }
public void overwrite(CommonCourt oldCommonCourt, CommonCourt newCommonCourt) { oldCommonCourt.setName(newCommonCourt.getName()); oldCommonCourt.setType(newCommonCourt.getType()); overwriteDepartments(oldCommonCourt, newCommonCourt); }
CommonCourtOverwriter { public void overwrite(CommonCourt oldCommonCourt, CommonCourt newCommonCourt) { oldCommonCourt.setName(newCommonCourt.getName()); oldCommonCourt.setType(newCommonCourt.getType()); overwriteDepartments(oldCommonCourt, newCommonCourt); } }
CommonCourtOverwriter { public void overwrite(CommonCourt oldCommonCourt, CommonCourt newCommonCourt) { oldCommonCourt.setName(newCommonCourt.getName()); oldCommonCourt.setType(newCommonCourt.getType()); overwriteDepartments(oldCommonCourt, newCommonCourt); }  }
CommonCourtOverwriter { public void overwrite(CommonCourt oldCommonCourt, CommonCourt newCommonCourt) { oldCommonCourt.setName(newCommonCourt.getName()); oldCommonCourt.setType(newCommonCourt.getType()); overwriteDepartments(oldCommonCourt, newCommonCourt); }  void overwrite(CommonCourt oldCommonCourt, CommonCourt newCommonCourt); }
CommonCourtOverwriter { public void overwrite(CommonCourt oldCommonCourt, CommonCourt newCommonCourt) { oldCommonCourt.setName(newCommonCourt.getName()); oldCommonCourt.setType(newCommonCourt.getType()); overwriteDepartments(oldCommonCourt, newCommonCourt); }  void overwrite(CommonCourt oldCommonCourt, CommonCourt newCommonCourt);  }