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

    List<String> idsToDelete = Lists.newArrayList("idA", "idB");
    when(solrServer.deleteById(idsToDelete)).thenThrow(new SolrException(ErrorCode.SERVER_ERROR, new IOException()));
    solrWriter.deleteById(-1, idsToDelete);
}