### Question:
JudgmentCriteriaFormConverter { public JudgmentCriteria convert(JudgmentCriteriaForm judgmentCriteriaForm) { JudgmentCriteria judgmentCriteria = new JudgmentCriteria(); judgmentCriteria.setAll(judgmentCriteriaForm.getAll()); judgmentCriteria.setCaseNumber(judgmentCriteriaForm.getSignature()); judgmentCriteria.setJudgmentDateFrom(judgmentCriteriaForm.getDateFrom()); judgmentCriteria.setJudgmentDateTo(judgmentCriteriaForm.getDateTo()); judgmentCriteria.setJudgeName(judgmentCriteriaForm.getJudgeName()); convertCourtCriteria(judgmentCriteriaForm, judgmentCriteria); judgmentCriteria.setScJudgmentFormId(judgmentCriteriaForm.getScJudgmentFormId()); judgmentCriteria.setKeywords(judgmentCriteriaForm.getKeywords()); judgmentCriteria.setScPersonnelType(judgmentCriteriaForm.getScPersonnelType()); judgmentCriteria.setCtDissentingOpinion(judgmentCriteriaForm.getCtDissentingOpinion()); judgmentCriteria.setJudgmentTypes(Lists.newArrayList(judgmentCriteriaForm.getJudgmentTypes())); judgmentCriteria.setLegalBase(judgmentCriteriaForm.getLegalBase()); judgmentCriteria.setReferencedRegulation(judgmentCriteriaForm.getReferencedRegulation()); judgmentCriteria.setLawJournalEntryCode(judgmentCriteriaForm.getLawJournalEntryCode()); judgmentCriteria.setReferencedCourtCaseId(judgmentCriteriaForm.getReferencedCourtCaseId()); return judgmentCriteria; }  JudgmentCriteria convert(JudgmentCriteriaForm judgmentCriteriaForm);  }### Answer:
@Test public void convert_ccIncludeDependentCourtJudgments_FALSE() { JudgmentCriteriaForm judgmentCriteriaForm = createCriteriaForm(); JudgmentCriteria judgmentCriteria = judgmentCriteriaFormConverter.convert(judgmentCriteriaForm); assertEquals(judgmentCriteriaForm.getCourtCriteria().getCcCourtId(), judgmentCriteria.getCcCourtId()); assertNull(judgmentCriteria.getCcDirectOrSuperiorCourtId()); assertJudgmentCriteria(judgmentCriteriaForm, judgmentCriteria); }
@Test public void convert_ccIncludeDependentCourtJudgments_TRUE() { JudgmentCriteriaForm judgmentCriteriaForm = createCriteriaForm(); judgmentCriteriaForm.getCourtCriteria().setCcIncludeDependentCourtJudgments(true); JudgmentCriteria judgmentCriteria = judgmentCriteriaFormConverter.convert(judgmentCriteriaForm); assertEquals(judgmentCriteriaForm.getCourtCriteria().getCcCourtId(), judgmentCriteria.getCcDirectOrSuperiorCourtId()); assertNull(judgmentCriteria.getCcCourtId()); assertJudgmentCriteria(judgmentCriteriaForm, judgmentCriteria); }