@Test(expected = SolrException.class)
public void testAdd_SolrExceptionCausedByIOException() throws SolrServerException, IOException {

    SolrInputDocument inputDoc = mock(SolrInputDocument.class);
    Map<String,SolrInputDocument> inputDocMap = ImmutableMap.of("idA", inputDoc);
    when(solrServer.add(inputDocMap.values()))
        .thenThrow(new SolrException(ErrorCode.SERVER_ERROR, new IOException()));
    solrWriter.add(-1, inputDocMap);
}