### Question:
CcSpecificJudgmentOverwriter implements JudgmentOverwriter<CommonCourtJudgment> { @Override public void overwriteJudgment(CommonCourtJudgment oldJudgment, CommonCourtJudgment newJudgment, ImportCorrectionList correctionList) { overwriteCourt(oldJudgment, newJudgment); overwriteKeywords(oldJudgment, newJudgment); }  @Override void overwriteJudgment(CommonCourtJudgment oldJudgment, CommonCourtJudgment newJudgment, ImportCorrectionList correctionList);  }### Answer:
@Test public void overwriteJudgment_courtData_division() { CommonCourtDivision division = new CommonCourtDivision(); division.setCode("1234"); CommonCourt court = new CommonCourt(); division.setCourt(court); oldJudgment.setCourtDivision(division); CommonCourtDivision newDivision = new CommonCourtDivision(); newDivision.setCode("1234"); CommonCourt newCourt = new CommonCourt(); newDivision.setCourt(newCourt); newJudgment.setCourtDivision(newDivision); ccJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); assertEquals(newDivision, oldJudgment.getCourtDivision()); assertEquals(newDivision, newJudgment.getCourtDivision()); }
@Test public void overwriteJudgment_Keywords() { JudgmentKeyword keywordABC = new JudgmentKeyword(CourtType.COMMON, "ABC"); JudgmentKeyword keywordDEF = new JudgmentKeyword(CourtType.COMMON, "DEF"); JudgmentKeyword keywordGHI = new JudgmentKeyword(CourtType.COMMON, "GHI"); oldJudgment.addKeyword(keywordABC); oldJudgment.addKeyword(keywordDEF); newJudgment.addKeyword(keywordABC); newJudgment.addKeyword(keywordGHI); ccJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); assertThat(newJudgment.getKeywords(), Matchers.containsInAnyOrder(keywordABC, keywordGHI)); assertThat(oldJudgment.getKeywords(), Matchers.containsInAnyOrder(keywordABC, keywordGHI)); }