@Test public void convert_NOT_FOUND_IN_DB() { ReferencedRegulationsTagValueItem refRegulationItem1 = new ReferencedRegulationsTagValueItem(); refRegulationItem1.setJournalYear(1964); refRegulationItem1.setJournalNo(43); refRegulationItem1.setJournalEntry(296); refRegulationItem1.setJournalTitle("Ustawa z dnia 17 listopada 1964 r. - Kodeks postępowania cywilnego"); refRegulationItem1.setText("Ustawa z dnia 17 listopada 1964 r. - Kodeks postępowania cywilnego (Dz. U. z 1964 r. Nr 43, poz. 296 - art. 391; art. 98)"); List<JudgmentReferencedRegulation> referencedRegulations = referencedRegulationsTagValueConverter.convert(new ReferencedRegulationsTagValueItem[] { refRegulationItem1 }); assertEquals(1, referencedRegulations.size()); JudgmentReferencedRegulation referencedRegulation1 = referencedRegulations.get(0); LawJournalEntry lawJournalEntry1 = referencedRegulation1.getLawJournalEntry(); assertEquals(refRegulationItem1.getJournalYear(), lawJournalEntry1.getYear()); assertEquals(refRegulationItem1.getJournalNo(), lawJournalEntry1.getJournalNo()); assertEquals(refRegulationItem1.getJournalEntry(), lawJournalEntry1.getEntry()); assertEquals(refRegulationItem1.getJournalTitle(), lawJournalEntry1.getTitle()); assertEquals(refRegulationItem1.getText(), referencedRegulation1.getRawText()); assertTrue(referencedRegulation1.isGenerated()); }
@Override public List<JudgmentReferencedRegulation> convert(ReferencedRegulationsTagValueItem[] refrencedRegulationsTagValueItems) { Preconditions.checkNotNull(refrencedRegulationsTagValueItems); List<JudgmentReferencedRegulation> referencedRegulations = Lists.newArrayList(); for (ReferencedRegulationsTagValueItem referencedRegulationsTagValueItem : refrencedRegulationsTagValueItems) { referencedRegulations.add(convert(referencedRegulationsTagValueItem)); } return referencedRegulations; }
ReferencedRegulationsTagValueConverter implements EnrichmentTagValueConverter<ReferencedRegulationsTagValueItem[], List<JudgmentReferencedRegulation>> { @Override public List<JudgmentReferencedRegulation> convert(ReferencedRegulationsTagValueItem[] refrencedRegulationsTagValueItems) { Preconditions.checkNotNull(refrencedRegulationsTagValueItems); List<JudgmentReferencedRegulation> referencedRegulations = Lists.newArrayList(); for (ReferencedRegulationsTagValueItem referencedRegulationsTagValueItem : refrencedRegulationsTagValueItems) { referencedRegulations.add(convert(referencedRegulationsTagValueItem)); } return referencedRegulations; } }
ReferencedRegulationsTagValueConverter implements EnrichmentTagValueConverter<ReferencedRegulationsTagValueItem[], List<JudgmentReferencedRegulation>> { @Override public List<JudgmentReferencedRegulation> convert(ReferencedRegulationsTagValueItem[] refrencedRegulationsTagValueItems) { Preconditions.checkNotNull(refrencedRegulationsTagValueItems); List<JudgmentReferencedRegulation> referencedRegulations = Lists.newArrayList(); for (ReferencedRegulationsTagValueItem referencedRegulationsTagValueItem : refrencedRegulationsTagValueItems) { referencedRegulations.add(convert(referencedRegulationsTagValueItem)); } return referencedRegulations; }  }
ReferencedRegulationsTagValueConverter implements EnrichmentTagValueConverter<ReferencedRegulationsTagValueItem[], List<JudgmentReferencedRegulation>> { @Override public List<JudgmentReferencedRegulation> convert(ReferencedRegulationsTagValueItem[] refrencedRegulationsTagValueItems) { Preconditions.checkNotNull(refrencedRegulationsTagValueItems); List<JudgmentReferencedRegulation> referencedRegulations = Lists.newArrayList(); for (ReferencedRegulationsTagValueItem referencedRegulationsTagValueItem : refrencedRegulationsTagValueItems) { referencedRegulations.add(convert(referencedRegulationsTagValueItem)); } return referencedRegulations; }  @Override List<JudgmentReferencedRegulation> convert(ReferencedRegulationsTagValueItem[] refrencedRegulationsTagValueItems); @Autowired void setLawJournalEntryRepository(
            LawJournalEntryRepository lawJournalEntryRepository); }
ReferencedRegulationsTagValueConverter implements EnrichmentTagValueConverter<ReferencedRegulationsTagValueItem[], List<JudgmentReferencedRegulation>> { @Override public List<JudgmentReferencedRegulation> convert(ReferencedRegulationsTagValueItem[] refrencedRegulationsTagValueItems) { Preconditions.checkNotNull(refrencedRegulationsTagValueItems); List<JudgmentReferencedRegulation> referencedRegulations = Lists.newArrayList(); for (ReferencedRegulationsTagValueItem referencedRegulationsTagValueItem : refrencedRegulationsTagValueItems) { referencedRegulations.add(convert(referencedRegulationsTagValueItem)); } return referencedRegulations; }  @Override List<JudgmentReferencedRegulation> convert(ReferencedRegulationsTagValueItem[] refrencedRegulationsTagValueItems); @Autowired void setLawJournalEntryRepository(
            LawJournalEntryRepository lawJournalEntryRepository);  }