### Question:
JudgmentSeriesCriteriaConverter { public JudgmentCriteria convert(JudgmentSeriesCriteria judgmentSeriesCriteria) { JudgmentCriteria judgmentCriteria = new JudgmentCriteria(); judgmentCriteria.setAll(judgmentSeriesCriteria.getPhrase()); judgmentCriteria.setJudgmentDateFrom(judgmentSeriesCriteria.getStartJudgmentDate()); judgmentCriteria.setJudgmentDateTo(judgmentSeriesCriteria.getEndJudgmentDate()); convertCourtCriteria(judgmentSeriesCriteria, judgmentCriteria); return judgmentCriteria; }  JudgmentCriteria convert(JudgmentSeriesCriteria judgmentSeriesCriteria);  }### Answer:
@Test public void convert_ccIncludeDependentCourtJudgments_FALSE() { JudgmentSeriesCriteria judgmentSeriesCriteria = new JudgmentSeriesCriteria(); judgmentSeriesCriteria.setPhrase("XYZ"); judgmentSeriesCriteria.setStartJudgmentDate(new LocalDate(2011, 11, 11)); judgmentSeriesCriteria.setEndJudgmentDate(new LocalDate(2013, 12, 27)); JudgmentCriteria judgmentCriteria = judgmentSeriesCriteriaConverter.convert(judgmentSeriesCriteria); judgmentSeriesCriteria.setCcIncludeDependentCourtJudgments(false); assertEquals(judgmentSeriesCriteria.getCcCourtId(), judgmentCriteria.getCcCourtId()); assertNull(judgmentCriteria.getCcDirectOrSuperiorCourtId()); assertCriteria(judgmentSeriesCriteria, judgmentCriteria); }
@Test public void convert_ccIncludeDependentCourtJudgments_TRUE() { JudgmentSeriesCriteria judgmentSeriesCriteria = new JudgmentSeriesCriteria(); judgmentSeriesCriteria.setPhrase("XYZ"); judgmentSeriesCriteria.setStartJudgmentDate(new LocalDate(2011, 11, 11)); judgmentSeriesCriteria.setEndJudgmentDate(new LocalDate(2013, 12, 27)); judgmentSeriesCriteria.setCcIncludeDependentCourtJudgments(true); JudgmentCriteria judgmentCriteria = judgmentSeriesCriteriaConverter.convert(judgmentSeriesCriteria); assertEquals(judgmentSeriesCriteria.getCcCourtId(), judgmentCriteria.getCcDirectOrSuperiorCourtId()); assertNull(judgmentCriteria.getCcCourtId()); assertCriteria(judgmentSeriesCriteria, judgmentCriteria); }