@Test
    void validateNativeDefaultTargets() {
        FederationConfig.Builder fb = new FederationConfig.Builder();
        root.getConfig(fb, "searchchains/chain/native/component/federation");
        FederationConfig config = new FederationConfig(fb);

        for (FederationConfig.Target target : config.target()) {
            String failMessage = "Failed for target " + target.id();

            if (target.id().startsWith("source")) {
                assertTrue(target.useByDefault(), failMessage);
            } else {
                assertFalse(target.useByDefault(), failMessage);
            }
        }

        assertEquals(5, config.target().size());
        assertUseByDefault(config, "source1", false);
        assertUseByDefault(config, "source2", false);

        assertUseByDefault(config, "provider2", true);
        assertUseByDefault(config, "cluster2", true);

        assertUseByDefault(config, "sourceCommon", "provider1", false);
        assertUseByDefault(config, "sourceCommon", "provider3", false);

    }
Test generated config for federation.
@author Tony Vaagenes
config-model/src/test/java/com/yahoo/vespa/model/container/search/searchchain/FederationTest.java