@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 source_groups_are_inherited_when_inheritDefaultSources_is_true() throws Exception {
        FederationFixture f = new ProvidersWithSourceFixture();

        FederationConfig federationConfig = getConfig(f.federationSearchWithDefaultSources);
        assertEquals(1, federationConfig.target().size());

        FederationConfig.Target target = federationConfig.target(0);
        assertEquals(target.id(), "source");
        assertTrue(target.useByDefault(), "Not used by default");
        assertEquals(2, target.searchChain().size());
        assertTrue(target.searchChain().stream()
                .map(FederationConfig.Target.SearchChain::providerId)
                .toList().containsAll(List.of("provider1", "provider2")));
    }