@Override
    protected Component<? super Component<?, ?>, ?> doBuild(DeployState deployState, TreeConfigProducer<AnyConfigProducer> ancestor, Element spec) {
        var component = buildComponent(spec, deployState, ancestor);
        addChildren(deployState, ancestor, spec, component);
        return component;
    }
@Test
    @SuppressWarnings("unchecked")
    void components_can_be_nested() {
        Component<? super Component<?, ?>, ?> parent = new DomComponentBuilder().doBuild(root.getDeployState(), root, parse(
                "<component id='parent'>",
                "  <component id='child' />",
                "</component>"));

        assertEquals(ComponentId.fromString("parent"), parent.getGlobalComponentId());
        Component<?, ?> child = (Component<?, ?>) first(parent.getChildren().values());
        assertNotNull(child);

        assertEquals(ComponentId.fromString("child@parent"), child.getGlobalComponentId());
    }