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

        f.registerProviderWithSources(createProvider(ComponentId.fromString("provider1")));
        FederationSearcher federation = newFederationSearcher(true,
                List.of(new TargetSpec(ComponentSpecification.fromString("provider1"),
                        new FederationOptions().setTimeoutInMilliseconds(12345))));
        f.initializeFederationSearcher(federation);

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

        FederationConfig.Target target = federationConfig.target(0);
        assertEquals(1, target.searchChain().size());

        FederationConfig.Target.SearchChain searchChain = target.searchChain(0);
        assertEquals(12345, searchChain.timeoutMillis());
    }