}
@Test(expected = DaoException.class)
public void delete_withBrokenConnector() {
// Setup
DeleteRequestBuilder deleteRequestBuilder = mock(DeleteRequestBuilder.class);
when(clientMocked.prepareDelete(any(String.class), any(String.class), any(String.class))).thenReturn(deleteRequestBuilder);
ListenableActionFuture<DeleteResponse> listenableActionFutureMocked = mock(ListenableActionFuture.class);
when(deleteRequestBuilder.execute()).thenReturn(listenableActionFutureMocked);
when(listenableActionFutureMocked.actionGet()).thenThrow(new ElasticsearchException("Simulated exception"));
// Action
entityDao.delete(ESNode.class, 1l);
}