### Question:
ElasticSearchManager extends BaseSearchManager implements Initializable, PooledResourceManager<ElasticSearchClient> { @Override public void deleteAll() { int start = 0; int max = 1000; long total = max; int maxRetries = 5; int retries = 0; while (start < total) { SearchSourceBuilder sourceBuilder = new SearchSourceBuilder() .query(QueryBuilders.matchAllQuery()) .from(start) .size(max); SearchRequest searchRequest = new SearchRequest(INDEX) .types(INDEX_TYPE) .source(sourceBuilder); SearchResponse response; try (ElasticSearchClient client = singleton.getClient()) { response = client.getInstance().search(searchRequest); SearchHits searchHits = response.getHits(); BulkRequest bulkRequest = new BulkRequest(); if (searchHits.getTotalHits() > 0) { searchHits.forEach(hit -> { bulkRequest.add(new DeleteRequest(INDEX, INDEX_TYPE, hit.getId())); }); BulkResponse bulkResponse = client.getInstance().bulk(bulkRequest); if (bulkResponse.hasFailures()) { bulkResponse.forEach(br -> { if (StringUtils.isNotBlank(br.getFailureMessage())) { LOG.log(Level.WARNING, MessageFormat.format("A component failed to delete: {0}", br.getFailureMessage())); } }); } } start += searchHits.getHits().length; total = searchHits.getTotalHits(); } catch (ElasticsearchStatusException ex) { LOG.log(Level.WARNING, "Index is not found. Skipping delete."); LOG.log(Level.FINER, null, ex); indexCreated.set(false); retries++; if (retries == maxRetries) { throw new OpenStorefrontRuntimeException("Unable to correct index/search error on detail. Giving up.", "Check elasticsearch", ex); } } catch (IOException ex) { LOG.log(Level.SEVERE, null, ex); } } } protected  ElasticSearchManager(ServiceProxy service, PropertiesManager propertiesManager, BlockingQueue<ElasticSearchClient> clientPool); static ElasticSearchManager getInstance(); static ElasticSearchManager getInstance(PropertiesManager propertiesManager); static ElasticSearchManager getInstance(ServiceProxy service, PropertiesManager propertiesManager, BlockingQueue<ElasticSearchClient> clientPool); @Override ElasticSearchClient getClient(); @Override void releaseClient(ElasticSearchClient client); @Override int getMaxConnections(); @Override int getAvailableConnections(); @Override void shutdownPool(); @Override void initialize(); @Override void shutdown(); @Override ComponentSearchWrapper search(SearchQuery searchQuery, FilterQueryParams filter); @Override IndexSearchResult doIndexSearch(String query, FilterQueryParams filter); @Override IndexSearchResult doIndexSearch(String query, FilterQueryParams filter, String[] addtionalFieldsToReturn); @Override List<SearchSuggestion> searchSuggestions(String query, int maxResult, String componentType); @Override void index(List<Component> components); @Override void deleteById(String id); @Override void deleteAll(); @Override void saveAll(); @Override void resetIndexer(); @Override boolean isStarted();  }### Answer:
@Test public void testDeleteAll() { }