### Question:
JudgmentIndexingProcessor implements ItemProcessor<JudgmentIndexingData, SolrInputDocument> { @Override public SolrInputDocument process(JudgmentIndexingData item) throws Exception { SolrInputDocument doc = new SolrInputDocument(); fillJudgmentFields(doc, item); Judgment judgment = item.getJudgment(); judgmentRepository.markAsIndexed(judgment.getId()); return doc; }  @Override SolrInputDocument process(JudgmentIndexingData item); @Autowired void setJudgmentRepository(JudgmentRepository judgmentRepository); @Autowired void setJudgmentIndexFieldsFillers(
            List<JudgmentIndexFieldsFiller> judgmentIndexFieldsFillers);  }### Answer:
@Test public void process_SUPREME_COURT_JUDGMENT() throws Exception { SupremeCourtJudgment judgment = new SupremeCourtJudgment(); ReflectionTestUtils.setField(judgment, "id", 5); JudgmentIndexingData indexingData = new JudgmentIndexingData(); indexingData.setJudgment(judgment); judgmentIndexingProcessor.process(indexingData); ArgumentCaptor<JudgmentIndexingData> argCaptureForFill = ArgumentCaptor.forClass(JudgmentIndexingData.class); verify(scJudgmentIndexFieldsFiller, times(1)).fillFields(any(SolrInputDocument.class), argCaptureForFill.capture()); assertEquals(5, argCaptureForFill.getValue().getJudgment().getId()); verify(judgmentRepository).markAsIndexed(5L); }
@Test public void process_COMMON_COURT_JUDGMENT() throws Exception { CommonCourtJudgment judgment = new CommonCourtJudgment(); ReflectionTestUtils.setField(judgment, "id", 6); JudgmentIndexingData indexingData = new JudgmentIndexingData(); indexingData.setJudgment(judgment); judgmentIndexingProcessor.process(indexingData); ArgumentCaptor<JudgmentIndexingData> argCaptureForFill = ArgumentCaptor.forClass(JudgmentIndexingData.class); verify(ccJudgmentIndexFieldsFiller, times(1)).fillFields(any(SolrInputDocument.class), argCaptureForFill.capture()); assertEquals(6, argCaptureForFill.getValue().getJudgment().getId()); verify(judgmentRepository).markAsIndexed(6L); }