### Question:
ElasticSearchManager extends BaseSearchManager implements Initializable, PooledResourceManager<ElasticSearchClient> { @Override public void index(List<Component> components) { Objects.requireNonNull(components); if (!components.isEmpty()) { ObjectMapper objectMapper = StringProcessor.defaultObjectMapper(); BulkRequest bulkRequest = new BulkRequest(); ComponentAttribute componentAttribute = new ComponentAttribute(); componentAttribute.setActiveStatus(ComponentAttribute.ACTIVE_STATUS); List<ComponentAttribute> componentAttributes = componentAttribute.findByExample(); Map<String, List<ComponentAttribute>> attributeMap = componentAttributes.stream().collect(Collectors.groupingBy(ComponentAttribute::getComponentId)); ComponentReview componentReview = new ComponentReview(); componentReview.setActiveStatus(ComponentReview.ACTIVE_STATUS); List<ComponentReview> componentReviews = componentReview.findByExample(); Map<String, List<ComponentReview>> reviewMap = componentReviews.stream().collect(Collectors.groupingBy(ComponentReview::getComponentId)); ComponentTag componentTag = new ComponentTag(); componentTag.setActiveStatus(ComponentReview.ACTIVE_STATUS); List<ComponentTag> componentTags = componentTag.findByExample(); Map<String, List<ComponentTag>> tagMap = componentTags.stream().collect(Collectors.groupingBy(ComponentTag::getComponentId)); SearchStatTable statTable = new SearchStatTable(attributeMap, tagMap); statTable.index(); for (Component component : components) { componentAttributes = attributeMap.getOrDefault(component.getComponentId(), new ArrayList<>()); componentReviews = reviewMap.getOrDefault(component.getComponentId(), new ArrayList<>()); componentTags = tagMap.getOrDefault(component.getComponentId(), new ArrayList<>()); component.setDescription(StringProcessor.stripHtml(component.getDescription())); component.setDescription(StringProcessor.ellipseString(component.getDescription(), MAX_DESCRIPTION_INDEX_SIZE)); ComponentSearchView componentSearchView = ComponentSearchView.toView(component, componentAttributes, componentReviews, componentTags); try { bulkRequest.add(new IndexRequest(INDEX, INDEX_TYPE, componentSearchView.getComponentId()) .source(objectMapper.writeValueAsString(componentSearchView), XContentType.JSON)); } catch (JsonProcessingException ex) { LOG.log(Level.SEVERE, null, ex); } } BulkResponse bulkResponse; try (ElasticSearchClient client = singleton.getClient()) { bulkResponse = client.getInstance().bulk(bulkRequest); if (bulkResponse.hasFailures()) { bulkResponse.forEach(response -> { if (StringUtils.isNotBlank(response.getFailureMessage())) { LOG.log(Level.WARNING, MessageFormat.format("A component failed to index: {0}", response.getFailureMessage())); } }); } else { LOG.log(Level.FINE, "Index components successfully"); } } 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 testIndex() { }