private void verifyDefaultBindings(DeployState deployState, String bindingPrefix, ConfigModelContext.ApplicationType applicationType) {
        Element clusterElem = DomBuilderTest.parse(
                "<container id='default' version='1.0'>",
                "  <search/>",
                "  <document-api/>",
                "  <handler id='FooHandler'>",
                "     <binding>http://*/foo</binding>",
                "  </handler>",
                nodesXml,
                "</container>");

        createModel(root, deployState, null, clusterElem);
        JdiscBindingsConfig bindingsConfig = root.getConfig(JdiscBindingsConfig.class, "default");

        // Verify /search /feed /document and custom handler are bound correctly
        Map<String, JdiscBindingsConfig.Handlers> handlers = bindingsConfig.handlers();
        Map<String, List<String>> expectedHandlerMappings = Map.of(
                "com.yahoo.search.handler.SearchHandler", List.of("/search", "/search/*"),
                "com.yahoo.document.restapi.resource.DocumentV1ApiHandler", List.of("/document/v1/*", "/document/v1/*/"),
                "com.yahoo.vespa.http.server.FeedHandler", List.of("/reserved-for-internal-use/feedapi", "/reserved-for-internal-use/feedapi/"),
                "FooHandler", List.of("/foo"));
        expectedHandlerMappings.forEach((handler, bindings) -> validateHandler(handlers.get(handler), bindingPrefix, bindings));

        // All other handlers should be bound to default (http://*/...)
        handlers.entrySet().stream()
                .filter(e -> ! expectedHandlerMappings.containsKey(e.getKey()))
                .forEach(e -> assertTrue(e.getValue().serverBindings().stream().allMatch(s -> s.startsWith("http://*/"))));
    }
Tests for container model building with custom handlers.

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