@Test public void extractMeansOfAppeal() { String meansOfAppealString = "meansOfAppeal"; MeansOfAppeal meansOfAppeal = new MeansOfAppeal(CourtType.CONSTITUTIONAL_TRIBUNAL, meansOfAppealString); sJudgment.setMeansOfAppeal(meansOfAppealString); when(judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.CONSTITUTIONAL_TRIBUNAL, meansOfAppealString)).thenReturn(meansOfAppeal); MeansOfAppeal retMeansOfAppeal = judgmentExtractor.extractMeansOfAppeal(sJudgment, correctionList); assertTrue(meansOfAppeal == retMeansOfAppeal); }
@Override public MeansOfAppeal extractMeansOfAppeal(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getMeansOfAppeal()); }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public MeansOfAppeal extractMeansOfAppeal(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getMeansOfAppeal()); } }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public MeansOfAppeal extractMeansOfAppeal(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getMeansOfAppeal()); }  }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public MeansOfAppeal extractMeansOfAppeal(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getMeansOfAppeal()); }  @Override ConstitutionalTribunalJudgment createNewJudgment(); @Override List<CourtCase> extractCourtCases(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentTextContent extractTextContent(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override DateTime extractPublicationDate(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractPublisher(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractReviser(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<Judge> extractJudges(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<JudgmentReferencedRegulation> extractReferencedRegulations(
            SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentType extractJudgmentType(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLegalBases(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSummary(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractDecision(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractCourtReporters(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractJudgmentDate(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractReceiptDate(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLowerCourtJudgments(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override MeansOfAppeal extractMeansOfAppeal(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentResult extractJudgmentResult(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentId(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentUrl(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override SourceCode getSourceCode(); @Override void convertSpecific(ConstitutionalTribunalJudgment judgment,
            SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Autowired void setJudgmentMeansOfAppealCreator(JudgmentMeansOfAppealCreator judgmentMeansOfAppealCreator); @Autowired void setJudgmentResultCreator(JudgmentResultCreator judgmentResultCreator); @Autowired void setSourceJudgeExtractorHelper(SourceJudgeExtractorHelper sourceJudgeExtractorHelper); }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public MeansOfAppeal extractMeansOfAppeal(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getMeansOfAppeal()); }  @Override ConstitutionalTribunalJudgment createNewJudgment(); @Override List<CourtCase> extractCourtCases(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentTextContent extractTextContent(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override DateTime extractPublicationDate(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractPublisher(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractReviser(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<Judge> extractJudges(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<JudgmentReferencedRegulation> extractReferencedRegulations(
            SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentType extractJudgmentType(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLegalBases(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSummary(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractDecision(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractCourtReporters(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractJudgmentDate(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractReceiptDate(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLowerCourtJudgments(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override MeansOfAppeal extractMeansOfAppeal(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentResult extractJudgmentResult(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentId(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentUrl(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Override SourceCode getSourceCode(); @Override void convertSpecific(ConstitutionalTribunalJudgment judgment,
            SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList); @Autowired void setJudgmentMeansOfAppealCreator(JudgmentMeansOfAppealCreator judgmentMeansOfAppealCreator); @Autowired void setJudgmentResultCreator(JudgmentResultCreator judgmentResultCreator); @Autowired void setSourceJudgeExtractorHelper(SourceJudgeExtractorHelper sourceJudgeExtractorHelper);  }