@Test public void extractJudgmentResult() { String judgmentResultString = "judgmentResult"; JudgmentResult judgmentResult = new JudgmentResult(CourtType.CONSTITUTIONAL_TRIBUNAL, judgmentResultString); sJudgment.setJudgmentResult(judgmentResultString); when(judgmentResultCreator.fetchOrCreateJudgmentResult(CourtType.CONSTITUTIONAL_TRIBUNAL, judgmentResultString)).thenReturn(judgmentResult); JudgmentResult retJudgmentResult = judgmentExtractor.extractJudgmentResult(sJudgment, correctionList); assertTrue(judgmentResult == retJudgmentResult); }
@Override public JudgmentResult extractJudgmentResult(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getJudgmentResult())) { return null; } return judgmentResultCreator.fetchOrCreateJudgmentResult(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getJudgmentResult()); }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public JudgmentResult extractJudgmentResult(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getJudgmentResult())) { return null; } return judgmentResultCreator.fetchOrCreateJudgmentResult(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getJudgmentResult()); } }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public JudgmentResult extractJudgmentResult(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getJudgmentResult())) { return null; } return judgmentResultCreator.fetchOrCreateJudgmentResult(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getJudgmentResult()); }  }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public JudgmentResult extractJudgmentResult(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getJudgmentResult())) { return null; } return judgmentResultCreator.fetchOrCreateJudgmentResult(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getJudgmentResult()); }  @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 JudgmentResult extractJudgmentResult(SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { if (StringUtils.isEmpty(sourceJudgment.getJudgmentResult())) { return null; } return judgmentResultCreator.fetchOrCreateJudgmentResult(CourtType.CONSTITUTIONAL_TRIBUNAL, sourceJudgment.getJudgmentResult()); }  @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);  }