### Question:
JudgmentIndexingWriter implements ItemWriter<SolrInputDocument> { @Override public void write(List<? extends SolrInputDocument> items) throws Exception { List<SolrInputDocument> documents = Lists.newArrayList(); documents.addAll(items); solrServer.add(documents); }  @Override void write(List<? extends SolrInputDocument> items); @Autowired @Qualifier("solrJudgmentsServer") void setSolrServer(SolrServer solrServer);  }### Answer:
@Test public void write() throws Exception { SolrInputDocument firstDocument = new SolrInputDocument(); SolrInputDocument secondDocument = new SolrInputDocument(); judgmentIndexingWriter.write(Lists.newArrayList(firstDocument, secondDocument)); verify(judgmentsSolrServer, times(1)).add(addDocumentsCaptor.capture()); assertThat(addDocumentsCaptor.getValue(), containsInAnyOrder(firstDocument, secondDocument)); }