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

    SolrInputDocument inputDoc = mock(SolrInputDocument.class);
    Map<String,SolrInputDocument> inputDocumentMap = ImmutableMap.of("idA", inputDoc);
    when(solrServer.add(ImmutableList.of(inputDoc))).thenThrow(
            new SolrException(ErrorCode.BAD_REQUEST, "should be swallowed and logged"));
    solrWriter.add(-1, inputDocumentMap);
    // Nothing should happen -- no document successfully added, and exception is swallowed
}