@Test
public void testAdd_RetryIndividually() throws SolrServerException, IOException {

    SolrInputDocument badInputDoc = mock(SolrInputDocument.class);
    SolrInputDocument goodInputDoc = mock(SolrInputDocument.class);
    
    Map<String, SolrInputDocument> inputDocumentMap = ImmutableSortedMap.of("bad", badInputDoc, "good", goodInputDoc);
    
    when(solrServer.add(inputDocumentMap.values()))
        .thenThrow(new SolrException(ErrorCode.BAD_REQUEST, "bad document"));
    when(solrServer.add(badInputDoc)).thenThrow(new SolrException(ErrorCode.BAD_REQUEST, "bad document"));
    
    solrWriter.add(-1, inputDocumentMap);
    
    verify(solrServer).add(goodInputDoc);
}