@Test public void convertJudgment_extractJudgmentType() { JudgmentType judgmentType = JudgmentType.SENTENCE; when(judgmentDataExtractor.extractJudgmentType(eq(sourceJudgment), any(ImportCorrectionList.class))).thenReturn(judgmentType); judgmentConverter.convertJudgment(sourceJudgment); assertEquals(judgmentType, judgment.getJudgmentType()); }
public final JudgmentWithCorrectionList<JUDGMENT> convertJudgment(SOURCE_JUDGMENT sourceJudgment) { JUDGMENT judgment = judgmentDataExtractor.createNewJudgment(); ImportCorrectionList correctionList = new ImportCorrectionList(); convertCourtCases(judgment, sourceJudgment, correctionList); judgment.setJudgmentDate(judgmentDataExtractor.extractJudgmentDate(sourceJudgment, correctionList)); convertCourtReporters(judgment, sourceJudgment, correctionList); judgment.setDecision(judgmentDataExtractor.extractDecision(sourceJudgment, correctionList)); judgment.setSummary(judgmentDataExtractor.extractSummary(sourceJudgment, correctionList)); convertLegalBases(judgment, sourceJudgment, correctionList); judgment.setTextContent(judgmentDataExtractor.extractTextContent(sourceJudgment, correctionList)); judgment.setSourceInfo(extractSourceInfo(sourceJudgment, correctionList)); judgment.setJudgmentType(judgmentDataExtractor.extractJudgmentType(sourceJudgment, correctionList)); convertReferencedRegulations(judgment, sourceJudgment, correctionList); convertJudges(judgment, sourceJudgment, correctionList); judgment.setReceiptDate(judgmentDataExtractor.extractReceiptDate(sourceJudgment, correctionList)); convertLowerCourtJudgments(judgment, sourceJudgment, correctionList); judgment.setMeansOfAppeal(judgmentDataExtractor.extractMeansOfAppeal(sourceJudgment, correctionList)); judgment.setJudgmentResult(judgmentDataExtractor.extractJudgmentResult(sourceJudgment, correctionList)); judgmentDataExtractor.convertSpecific(judgment, sourceJudgment, correctionList); JudgmentWithCorrectionList<JUDGMENT> judgmentWithCorrectionList = new JudgmentWithCorrectionList<>(judgment, correctionList); return judgmentWithCorrectionList; }
JudgmentConverterImpl implements JudgmentConverter<JUDGMENT, SOURCE_JUDGMENT> { public final JudgmentWithCorrectionList<JUDGMENT> convertJudgment(SOURCE_JUDGMENT sourceJudgment) { JUDGMENT judgment = judgmentDataExtractor.createNewJudgment(); ImportCorrectionList correctionList = new ImportCorrectionList(); convertCourtCases(judgment, sourceJudgment, correctionList); judgment.setJudgmentDate(judgmentDataExtractor.extractJudgmentDate(sourceJudgment, correctionList)); convertCourtReporters(judgment, sourceJudgment, correctionList); judgment.setDecision(judgmentDataExtractor.extractDecision(sourceJudgment, correctionList)); judgment.setSummary(judgmentDataExtractor.extractSummary(sourceJudgment, correctionList)); convertLegalBases(judgment, sourceJudgment, correctionList); judgment.setTextContent(judgmentDataExtractor.extractTextContent(sourceJudgment, correctionList)); judgment.setSourceInfo(extractSourceInfo(sourceJudgment, correctionList)); judgment.setJudgmentType(judgmentDataExtractor.extractJudgmentType(sourceJudgment, correctionList)); convertReferencedRegulations(judgment, sourceJudgment, correctionList); convertJudges(judgment, sourceJudgment, correctionList); judgment.setReceiptDate(judgmentDataExtractor.extractReceiptDate(sourceJudgment, correctionList)); convertLowerCourtJudgments(judgment, sourceJudgment, correctionList); judgment.setMeansOfAppeal(judgmentDataExtractor.extractMeansOfAppeal(sourceJudgment, correctionList)); judgment.setJudgmentResult(judgmentDataExtractor.extractJudgmentResult(sourceJudgment, correctionList)); judgmentDataExtractor.convertSpecific(judgment, sourceJudgment, correctionList); JudgmentWithCorrectionList<JUDGMENT> judgmentWithCorrectionList = new JudgmentWithCorrectionList<>(judgment, correctionList); return judgmentWithCorrectionList; } }
JudgmentConverterImpl implements JudgmentConverter<JUDGMENT, SOURCE_JUDGMENT> { public final JudgmentWithCorrectionList<JUDGMENT> convertJudgment(SOURCE_JUDGMENT sourceJudgment) { JUDGMENT judgment = judgmentDataExtractor.createNewJudgment(); ImportCorrectionList correctionList = new ImportCorrectionList(); convertCourtCases(judgment, sourceJudgment, correctionList); judgment.setJudgmentDate(judgmentDataExtractor.extractJudgmentDate(sourceJudgment, correctionList)); convertCourtReporters(judgment, sourceJudgment, correctionList); judgment.setDecision(judgmentDataExtractor.extractDecision(sourceJudgment, correctionList)); judgment.setSummary(judgmentDataExtractor.extractSummary(sourceJudgment, correctionList)); convertLegalBases(judgment, sourceJudgment, correctionList); judgment.setTextContent(judgmentDataExtractor.extractTextContent(sourceJudgment, correctionList)); judgment.setSourceInfo(extractSourceInfo(sourceJudgment, correctionList)); judgment.setJudgmentType(judgmentDataExtractor.extractJudgmentType(sourceJudgment, correctionList)); convertReferencedRegulations(judgment, sourceJudgment, correctionList); convertJudges(judgment, sourceJudgment, correctionList); judgment.setReceiptDate(judgmentDataExtractor.extractReceiptDate(sourceJudgment, correctionList)); convertLowerCourtJudgments(judgment, sourceJudgment, correctionList); judgment.setMeansOfAppeal(judgmentDataExtractor.extractMeansOfAppeal(sourceJudgment, correctionList)); judgment.setJudgmentResult(judgmentDataExtractor.extractJudgmentResult(sourceJudgment, correctionList)); judgmentDataExtractor.convertSpecific(judgment, sourceJudgment, correctionList); JudgmentWithCorrectionList<JUDGMENT> judgmentWithCorrectionList = new JudgmentWithCorrectionList<>(judgment, correctionList); return judgmentWithCorrectionList; }  }
JudgmentConverterImpl implements JudgmentConverter<JUDGMENT, SOURCE_JUDGMENT> { public final JudgmentWithCorrectionList<JUDGMENT> convertJudgment(SOURCE_JUDGMENT sourceJudgment) { JUDGMENT judgment = judgmentDataExtractor.createNewJudgment(); ImportCorrectionList correctionList = new ImportCorrectionList(); convertCourtCases(judgment, sourceJudgment, correctionList); judgment.setJudgmentDate(judgmentDataExtractor.extractJudgmentDate(sourceJudgment, correctionList)); convertCourtReporters(judgment, sourceJudgment, correctionList); judgment.setDecision(judgmentDataExtractor.extractDecision(sourceJudgment, correctionList)); judgment.setSummary(judgmentDataExtractor.extractSummary(sourceJudgment, correctionList)); convertLegalBases(judgment, sourceJudgment, correctionList); judgment.setTextContent(judgmentDataExtractor.extractTextContent(sourceJudgment, correctionList)); judgment.setSourceInfo(extractSourceInfo(sourceJudgment, correctionList)); judgment.setJudgmentType(judgmentDataExtractor.extractJudgmentType(sourceJudgment, correctionList)); convertReferencedRegulations(judgment, sourceJudgment, correctionList); convertJudges(judgment, sourceJudgment, correctionList); judgment.setReceiptDate(judgmentDataExtractor.extractReceiptDate(sourceJudgment, correctionList)); convertLowerCourtJudgments(judgment, sourceJudgment, correctionList); judgment.setMeansOfAppeal(judgmentDataExtractor.extractMeansOfAppeal(sourceJudgment, correctionList)); judgment.setJudgmentResult(judgmentDataExtractor.extractJudgmentResult(sourceJudgment, correctionList)); judgmentDataExtractor.convertSpecific(judgment, sourceJudgment, correctionList); JudgmentWithCorrectionList<JUDGMENT> judgmentWithCorrectionList = new JudgmentWithCorrectionList<>(judgment, correctionList); return judgmentWithCorrectionList; }  final JudgmentWithCorrectionList<JUDGMENT> convertJudgment(SOURCE_JUDGMENT sourceJudgment); void setJudgmentDataExtractor(JudgmentDataExtractor<JUDGMENT, SOURCE_JUDGMENT> judgmentDataExtractor); }
JudgmentConverterImpl implements JudgmentConverter<JUDGMENT, SOURCE_JUDGMENT> { public final JudgmentWithCorrectionList<JUDGMENT> convertJudgment(SOURCE_JUDGMENT sourceJudgment) { JUDGMENT judgment = judgmentDataExtractor.createNewJudgment(); ImportCorrectionList correctionList = new ImportCorrectionList(); convertCourtCases(judgment, sourceJudgment, correctionList); judgment.setJudgmentDate(judgmentDataExtractor.extractJudgmentDate(sourceJudgment, correctionList)); convertCourtReporters(judgment, sourceJudgment, correctionList); judgment.setDecision(judgmentDataExtractor.extractDecision(sourceJudgment, correctionList)); judgment.setSummary(judgmentDataExtractor.extractSummary(sourceJudgment, correctionList)); convertLegalBases(judgment, sourceJudgment, correctionList); judgment.setTextContent(judgmentDataExtractor.extractTextContent(sourceJudgment, correctionList)); judgment.setSourceInfo(extractSourceInfo(sourceJudgment, correctionList)); judgment.setJudgmentType(judgmentDataExtractor.extractJudgmentType(sourceJudgment, correctionList)); convertReferencedRegulations(judgment, sourceJudgment, correctionList); convertJudges(judgment, sourceJudgment, correctionList); judgment.setReceiptDate(judgmentDataExtractor.extractReceiptDate(sourceJudgment, correctionList)); convertLowerCourtJudgments(judgment, sourceJudgment, correctionList); judgment.setMeansOfAppeal(judgmentDataExtractor.extractMeansOfAppeal(sourceJudgment, correctionList)); judgment.setJudgmentResult(judgmentDataExtractor.extractJudgmentResult(sourceJudgment, correctionList)); judgmentDataExtractor.convertSpecific(judgment, sourceJudgment, correctionList); JudgmentWithCorrectionList<JUDGMENT> judgmentWithCorrectionList = new JudgmentWithCorrectionList<>(judgment, correctionList); return judgmentWithCorrectionList; }  final JudgmentWithCorrectionList<JUDGMENT> convertJudgment(SOURCE_JUDGMENT sourceJudgment); void setJudgmentDataExtractor(JudgmentDataExtractor<JUDGMENT, SOURCE_JUDGMENT> judgmentDataExtractor);  }