@Test
public void testDeleteException() throws Exception {

    when(client.deleteByQuery(any(DeleteByQueryRequest.class), any()))
            .thenThrow(Exception.class);
    ElasticSearchDataCleaner elasticSearchDataCleaner = new ElasticSearchDataCleaner();
    BulkByScrollResponse actual = elasticSearchDataCleaner.deleteData(client);
    assertNull(actual);
}