@Test
public void testDelete() throws Exception {

    BulkByScrollResponse expected = buildBulkResponse();
    when(client.deleteByQuery(any(DeleteByQueryRequest.class), any()))
            .thenReturn(expected);
    ElasticSearchDataCleaner elasticSearchDataCleaner = new ElasticSearchDataCleaner();
    BulkByScrollResponse actual = elasticSearchDataCleaner.deleteData(client);
    assertEquals(actual,expected);
}