@Test public void extractMeansOfAppeal() { String meansOfAppealString = "meansOfAppeal"; MeansOfAppeal meansOfAppeal = new MeansOfAppeal(CourtType.SUPREME, meansOfAppealString); sJudgment.setMeansOfAppeal(meansOfAppealString); when(judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.SUPREME, meansOfAppealString)).thenReturn(meansOfAppeal); MeansOfAppeal retMeansOfAppeal = judgmentExtractor.extractMeansOfAppeal(sJudgment, correctionList); assertTrue(meansOfAppeal == retMeansOfAppeal); }
@Override public MeansOfAppeal extractMeansOfAppeal(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.SUPREME, sourceJudgment.getMeansOfAppeal()); }
SourceScJudgmentExtractor implements JudgmentDataExtractor<SupremeCourtJudgment, SourceScJudgment> { @Override public MeansOfAppeal extractMeansOfAppeal(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.SUPREME, sourceJudgment.getMeansOfAppeal()); } }
SourceScJudgmentExtractor implements JudgmentDataExtractor<SupremeCourtJudgment, SourceScJudgment> { @Override public MeansOfAppeal extractMeansOfAppeal(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.SUPREME, sourceJudgment.getMeansOfAppeal()); }  }
SourceScJudgmentExtractor implements JudgmentDataExtractor<SupremeCourtJudgment, SourceScJudgment> { @Override public MeansOfAppeal extractMeansOfAppeal(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.SUPREME, sourceJudgment.getMeansOfAppeal()); }  @Override SupremeCourtJudgment createNewJudgment(); @Override List<CourtCase> extractCourtCases(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentTextContent extractTextContent(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override DateTime extractPublicationDate(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractPublisher(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractReviser(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<Judge> extractJudges(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<JudgmentReferencedRegulation> extractReferencedRegulations(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentType extractJudgmentType(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLegalBases(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSummary(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractDecision(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractCourtReporters(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractJudgmentDate(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractReceiptDate(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLowerCourtJudgments(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override MeansOfAppeal extractMeansOfAppeal(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentResult extractJudgmentResult(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentId(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentUrl(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override SourceCode getSourceCode(); @Override void convertSpecific(SupremeCourtJudgment judgment, SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Autowired void setScJudgmentFormCreator(ScJudgmentFormCreator scJudgmentFormCreator); @Autowired void setScChamberNameNormalizer(ScChamberNameNormalizer scChamberNameNormalizer); @Autowired void setScChamberCreator(ScChamberCreator scChamberCreator); @Autowired void setScJudgmentFormConverter(ScJudgmentFormConverter scJudgmentFormConverter); @Autowired void setScJudgmentFormNameNormalizer(ScJudgmentFormNameNormalizer scJudgmentFormNameNormalizer); @Autowired void setScChamberDivisionCreator(ScChamberDivisionCreator scChamberDivisionCreator); @Autowired void setJudgmentMeansOfAppealCreator(JudgmentMeansOfAppealCreator judgmentMeansOfAppealCreator); @Autowired void setJudgmentResultCreator(JudgmentResultCreator judgmentResultCreator); @Autowired void setSourceJudgeExtractorHelper(SourceJudgeExtractorHelper sourceJudgeExtractorHelper); }
SourceScJudgmentExtractor implements JudgmentDataExtractor<SupremeCourtJudgment, SourceScJudgment> { @Override public MeansOfAppeal extractMeansOfAppeal(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getMeansOfAppeal())) { return null; } return judgmentMeansOfAppealCreator.fetchOrCreateMeansOfAppeal(CourtType.SUPREME, sourceJudgment.getMeansOfAppeal()); }  @Override SupremeCourtJudgment createNewJudgment(); @Override List<CourtCase> extractCourtCases(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentTextContent extractTextContent(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override DateTime extractPublicationDate(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractPublisher(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractReviser(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<Judge> extractJudges(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<JudgmentReferencedRegulation> extractReferencedRegulations(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentType extractJudgmentType(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLegalBases(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSummary(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractDecision(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractCourtReporters(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractJudgmentDate(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override LocalDate extractReceiptDate(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override List<String> extractLowerCourtJudgments(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override MeansOfAppeal extractMeansOfAppeal(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override JudgmentResult extractJudgmentResult(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentId(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override String extractSourceJudgmentUrl(SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Override SourceCode getSourceCode(); @Override void convertSpecific(SupremeCourtJudgment judgment, SourceScJudgment sourceJudgment, ImportCorrectionList correctionList); @Autowired void setScJudgmentFormCreator(ScJudgmentFormCreator scJudgmentFormCreator); @Autowired void setScChamberNameNormalizer(ScChamberNameNormalizer scChamberNameNormalizer); @Autowired void setScChamberCreator(ScChamberCreator scChamberCreator); @Autowired void setScJudgmentFormConverter(ScJudgmentFormConverter scJudgmentFormConverter); @Autowired void setScJudgmentFormNameNormalizer(ScJudgmentFormNameNormalizer scJudgmentFormNameNormalizer); @Autowired void setScChamberDivisionCreator(ScChamberDivisionCreator scChamberDivisionCreator); @Autowired void setJudgmentMeansOfAppealCreator(JudgmentMeansOfAppealCreator judgmentMeansOfAppealCreator); @Autowired void setJudgmentResultCreator(JudgmentResultCreator judgmentResultCreator); @Autowired void setSourceJudgeExtractorHelper(SourceJudgeExtractorHelper sourceJudgeExtractorHelper);  }