SearchChains extends Chains<SearchChain> { @Override public ComponentRegistry<SearchChain> allChains() { ComponentRegistry<SearchChain> allChains = new ComponentRegistry<>(); for (SearchChain chain : getChainGroup().getComponents()) { allChains.register(chain.getId(), chain); if (chain instanceof Provider) addSources(allChains, (Provider)chain); } allChains.freeze(); return allChains; } SearchChains(AbstractConfigProducer parent, String subId); void initialize(Map<String, ? extends AbstractSearchCluster> searchClustersByName); @Override void validate(); Collection<LocalProvider> localProviders(); @Override void add(SearchChain searchChain); @Override ComponentRegistry<SearchChain> allChains();  }
@Test public void require_that_source_chain_spec_id_is_namespaced_in_provider_id() { Source source = (Source) getSearchChains().allChains().getComponent("source:1@provider:1"); assertThat(source.getChainSpecification().componentId.getNamespace(), is(ComponentId.fromString("provider:1"))); }