### Question:
ImportCorrectionList { public void changeCorrectedObject(DataObject oldObject, DataObject newObject) { Preconditions.checkNotNull(oldObject); Preconditions.checkNotNull(newObject); Preconditions.checkArgument(oldObject.getClass().equals(newObject.getClass())); for (ImportCorrection importCorrection : importCorrections) { if (importCorrection.getCorrectedObject() == oldObject) { importCorrection.setCorrectedObject(newObject); } } }  void addCorrection(ImportCorrection importCorrection); void changeCorrectedObject(DataObject oldObject, DataObject newObject); int getNumberOfCorrections(); boolean hasImportCorrection(ImportCorrection importCorrection); List<ImportCorrection> getImportCorrections(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); public List<ImportCorrection> importCorrections; }### Answer:
@Test public void changeCorrectedObject() { Judge judgeJanNowakowski = new Judge("Jan Nowakowski"); correctionList.changeCorrectedObject(judgeJanNowak, judgeJanNowakowski); assertTrue(correctionJudgeNameNowak.getCorrectedObject() == judgeJanNowakowski); }
@Test(expected=NullPointerException.class) public void changeCorrectedObject_NullNewObject() { correctionList.changeCorrectedObject(judgeJanNowak, null); }
@Test(expected=NullPointerException.class) public void changeCorrectedObject_NullOldObject() { correctionList.changeCorrectedObject(null, judgeJanNowak); }
@Test(expected=IllegalArgumentException.class) public void changeCorrectedObject_DifferentClasses() { correctionList.changeCorrectedObject(new SupremeCourtJudgmentForm(), judgeJanNowak); }