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

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