@Override
    public void getConfig(FederationConfig.Builder builder) {
        for (Target target : resolvedTargets.values())
            builder.target(target.getTargetConfig());

        targetSelector.ifPresent(selector -> builder.targetSelector(selector.getGlobalComponentId().stringValue()));
    }
@Test
    void default_providers_are_inherited_when_inheritDefaultSources_is_true() throws Exception {
        FederationFixture f = new FederationFixture();

        final String providerId = "providerId";

        f.registerProviderWithSources(createProvider(ComponentId.fromString(providerId)));
        f.initializeFederationSearcher(f.federationSearchWithDefaultSources);

        FederationConfig federationConfig = getConfig(f.federationSearchWithDefaultSources);
        FederationConfig.Target target = federationConfig.target(0);

        assertSame(providerId, target.id()); // by identity
        assertTrue(target.searchChain(0).useByDefault(), "Not used by default");
    }