@Test public void overwrite_Code() { oldCourt.setCode("XX"); newCourt.setCode("YY"); commonCourtOverwriter.overwrite(oldCourt, newCourt); assertEquals("XX", oldCourt.getCode()); assertEquals("YY", newCourt.getCode()); }
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);  }