@Test public void convertSpecific_DISSENTING_OPINIONS() { ConstitutionalTribunalJudgment ctJudgment = new ConstitutionalTribunalJudgment(); SourceCtDissentingOpinion sDissentingOpinion1 = new SourceCtDissentingOpinion(); sDissentingOpinion1.setAuthors(Lists.newArrayList("Jan Kowalski", "Adam Nowak")); sDissentingOpinion1.setTextContent("text content 1"); SourceCtDissentingOpinion sDissentingOpinion2 = new SourceCtDissentingOpinion(); sDissentingOpinion2.setAuthors(Lists.newArrayList("Jacek Zieliński")); sDissentingOpinion2.setTextContent("text content 2"); sJudgment.setDissentingOpinions(Lists.newArrayList(sDissentingOpinion1, sDissentingOpinion2)); judgmentExtractor.convertSpecific(ctJudgment, sJudgment, correctionList); ConstitutionalTribunalJudgmentDissentingOpinion expectedDissentingOpinion1 = new ConstitutionalTribunalJudgmentDissentingOpinion(); expectedDissentingOpinion1.addAuthor(sDissentingOpinion1.getAuthors().get(0)); expectedDissentingOpinion1.addAuthor(sDissentingOpinion1.getAuthors().get(1)); expectedDissentingOpinion1.setTextContent(sDissentingOpinion1.getTextContent()); expectedDissentingOpinion1.setJudgment(ctJudgment); ConstitutionalTribunalJudgmentDissentingOpinion expectedDissentingOpinion2 = new ConstitutionalTribunalJudgmentDissentingOpinion(); expectedDissentingOpinion2.addAuthor(sDissentingOpinion2.getAuthors().get(0)); expectedDissentingOpinion2.setTextContent(sDissentingOpinion2.getTextContent()); expectedDissentingOpinion2.setJudgment(ctJudgment); assertThat(ctJudgment.getDissentingOpinions(), containsInAnyOrder(expectedDissentingOpinion1, expectedDissentingOpinion2)); }
@Override public void convertSpecific(ConstitutionalTribunalJudgment judgment, SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { extractDissentingOpinions(judgment, sourceJudgment).forEach(o -> judgment.addDissentingOpinion(o)); }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public void convertSpecific(ConstitutionalTribunalJudgment judgment, SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { extractDissentingOpinions(judgment, sourceJudgment).forEach(o -> judgment.addDissentingOpinion(o)); } }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public void convertSpecific(ConstitutionalTribunalJudgment judgment, SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { extractDissentingOpinions(judgment, sourceJudgment).forEach(o -> judgment.addDissentingOpinion(o)); }  }
SourceCtJudgmentExtractor implements JudgmentDataExtractor<ConstitutionalTribunalJudgment, SourceCtJudgment> { @Override public void convertSpecific(ConstitutionalTribunalJudgment judgment, SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { extractDissentingOpinions(judgment, sourceJudgment).forEach(o -> judgment.addDissentingOpinion(o)); }  @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 void convertSpecific(ConstitutionalTribunalJudgment judgment, SourceCtJudgment sourceJudgment, ImportCorrectionList correctionList) { extractDissentingOpinions(judgment, sourceJudgment).forEach(o -> judgment.addDissentingOpinion(o)); }  @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);  }