@Test
    public void testCombinedCluster() {
        String xmlWithNodes =
                "<?xml version='1.0' encoding='utf-8' ?>" +
                        "<services>" +
                        "  <container version='1.0' id='container1'>" +
                        "     <search/>" +
                        "     <nodes of='content1'/>" +
                        "  </container>" +
                        "  <content version='1.0' id='content1'>" +
                        "     <redundancy>2</redundancy>" +
                        "     <documents>" +
                        "       <document type='type1' mode='index'/>" +
                        "     </documents>" +
                        "     <nodes count='2'>" +
                        "       <resources vcpu='1' memory='3Gb' disk='9Gb'/>" +
                        "     </nodes>" +
                        "   </content>" +
                        "</services>";
        VespaModelTester tester = new VespaModelTester();
        tester.addHosts(5);
        TestLogger logger = new TestLogger();
        VespaModel model = tester.createModel(xmlWithNodes, true, deployStateWithClusterEndpoints("container1").deployLogger(logger));
        assertEquals(2, model.getContentClusters().get("content1").getRootGroup().getNodes().size(), "Nodes in content1");
        assertEquals(2, model.getContainerClusters().get("container1").getContainers().size(), "Nodes in container1");
        assertEquals(24, physicalMemoryPercentage(model.getContainerClusters().get("container1")), "Heap size is lowered with combined clusters");
        assertEquals(1876900708, protonMemorySize(model.getContentClusters().get("content1")), "Memory for proton is lowered to account for the jvm heap");
        assertProvisioned(0, ClusterSpec.Id.from("container1"), ClusterSpec.Type.container, model);
        assertProvisioned(2, ClusterSpec.Id.from("content1"), ClusterSpec.Id.from("container1"), ClusterSpec.Type.combined, model);
        var msgs = logger.msgs().stream().filter(m -> m.level().equals(Level.WARNING)).toList();
        assertEquals(1, msgs.size(), msgs.toString());
        assertEquals("Declaring combined cluster with <nodes of=\"...\"> is deprecated without replacement, " +
                     "and the feature will be removed in Vespa 9. Use separate container and content clusters instead",
                     msgs.get(0).message);
    }
Test cases for provisioning nodes to entire Vespa models.

@author Vegard Havdal
@author bratseth
config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java