@Test
    void default_root_handler_binding_can_be_stolen_by_user_configured_handler() {
        Element clusterElem = DomBuilderTest.parse(
                "<container id='default' version='1.0'>" +
                        "  <handler id='userRootHandler'>" +
                        "    <binding>" + ROOT_HANDLER_BINDING.patternString() + "</binding>" +
                        "  </handler>" +
                        "</container>");
        createModel(root, clusterElem);

        // The handler is still set up.
        ComponentsConfig.Components userRootHandler = getComponentInConfig(componentsConfig(), BindingsOverviewHandler.class.getName());
        assertNotNull(userRootHandler);

        // .. but it has no bindings
        var discBindingsConfig = root.getConfig(JdiscBindingsConfig.class, "default");
        assertNull(discBindingsConfig.handlers(BindingsOverviewHandler.class.getName()));
    }
Tests for container model building with custom handlers.

@author gjoranv
config-model/src/test/java/com/yahoo/vespa/model/container/xml/HandlerBuilderTest.java