### Question:
JudgmentIndexFieldsFiller { public void fillFields(SolrInputDocument doc, JudgmentIndexingData judgmentData) { Judgment judgment = judgmentData.getJudgment(); fillIds(doc, judgment); fillSourceCode(doc, judgment); fillCourtType(doc, judgment); fillCourtCases(doc, judgment); fillJudges(doc, judgment); fillLegalBases(doc, judgment); fillReferencedRegulations(doc, judgment); fillReferencedCourtCases(doc, judgment); fillJudgmentDate(doc, judgment); fillJudgmentType(doc, judgment); fillMeansOfAppeal(doc, judgment); fillJudgmentResult(doc, judgment); fillContent(doc, judgment); fillMaxMoneyAmount(doc, judgment); fillReferencingCount(doc, judgmentData); }  abstract boolean isApplicable(CourtType courtType); void fillFields(SolrInputDocument doc, JudgmentIndexingData judgmentData); @Autowired void setFieldAdder(SolrFieldAdder<JudgmentIndexField> fieldAdder);  }### Answer:
@Test @UseDataProvider("judgmentsFieldsData") public void fillFields(Judgment givenJudgment, List<SolrInputField> expectedFields) { SolrInputDocument doc = new SolrInputDocument(); JudgmentIndexingData indexingData = new JudgmentIndexingData(); indexingData.setJudgment(givenJudgment); judgmentIndexFieldsFiller.fillFields(doc, indexingData); expectedFields.forEach(expectedField -> assertFieldValues(doc, expectedField)); }
@Test public void fillFields_REFERENCING_COUNT() { SolrInputFieldFactory fieldFactory = new SolrInputFieldFactory(); SolrInputDocument doc = new SolrInputDocument(); JudgmentIndexingData indexingData = new JudgmentIndexingData(); indexingData.setJudgment(new CommonCourtJudgment()); indexingData.setReferencingCount(4); judgmentIndexFieldsFiller.fillFields(doc, indexingData); assertFieldValues(doc, fieldFactory.create("referencingJudgmentsCount", 4L)); }