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