@Override
    protected FederationSearcher doBuild(DeployState deployState, TreeConfigProducer<AnyConfigProducer> ancestor, Element searcherElement) {
        FederationSearcherModel model = new FederationSearcherModelBuilder(searcherElement).build();
        Optional<Component> targetSelector = buildTargetSelector(deployState, ancestor, searcherElement, model.getComponentId());

        return new FederationSearcher(model, targetSelector);
    }
@Test
    void ensureCorrectModel() {
        FederationSearcher searcher = new DomFederationSearcherBuilder().doBuild(root.getDeployState(), root, parse(
                "<federation id='theId'>",
                "    <provides>p2</provides>",
                "    <source-set inherits=\"default\" />",
                "    <source id='source1'>",
                "        <federationoptions optional='true' />",
                "    </source>",
                "    <source id='source2' />",
                "</federation>"));

        FederationSearcherModel model = searcher.model;

        assertEquals("theId", model.bundleInstantiationSpec.id.stringValue());
        assertEquals(com.yahoo.search.federation.FederationSearcher.class.getName(),
                model.bundleInstantiationSpec.classId.stringValue());

        assertEquals(2, model.targets.size());
        assertTrue(model.inheritDefaultSources, "source-set option was ignored");

        assertTrue(targetNames(model.targets).containsAll(List.of("source1", "source2")));
    }