@Test(expected=NullPointerException.class) public void overwriteJudgment_NULL() { Judgment oldJudgment = null; Judgment newJudgment = mock(Judgment.class); delegatingJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); verifyZeroInteractions(commonJudgmentOverwriter, specificJudgmentOverwriter); }
@Override public final void overwriteJudgment(T oldJudgment, T newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); commonJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); specificJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); }
DelegatingJudgmentOverwriter implements JudgmentOverwriter<T> { @Override public final void overwriteJudgment(T oldJudgment, T newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); commonJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); specificJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); } }
DelegatingJudgmentOverwriter implements JudgmentOverwriter<T> { @Override public final void overwriteJudgment(T oldJudgment, T newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); commonJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); specificJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); }  }
DelegatingJudgmentOverwriter implements JudgmentOverwriter<T> { @Override public final void overwriteJudgment(T oldJudgment, T newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); commonJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); specificJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); }  @Override final void overwriteJudgment(T oldJudgment, T newJudgment, ImportCorrectionList correctionList); @Autowired void setCommonJudgmentOverwriter(JudgmentOverwriter<Judgment> commonJudgmentOverwriter); void setSpecificJudgmentOverwriter(JudgmentOverwriter<T> specificJudgmentOverwriter); }
DelegatingJudgmentOverwriter implements JudgmentOverwriter<T> { @Override public final void overwriteJudgment(T oldJudgment, T newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); commonJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); specificJudgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); }  @Override final void overwriteJudgment(T oldJudgment, T newJudgment, ImportCorrectionList correctionList); @Autowired void setCommonJudgmentOverwriter(JudgmentOverwriter<Judgment> commonJudgmentOverwriter); void setSpecificJudgmentOverwriter(JudgmentOverwriter<T> specificJudgmentOverwriter);  }