@Test
    public void testClusterMembership() {
        String xmlWithNodes =
                "<?xml version='1.0' encoding='utf-8' ?>" +
                "<services>" +
                "  <container version='1.0' id='container1'>" +
                "     <nodes count='1'/>" +
                "  </container>" +
                "</services>";
        VespaModelTester tester = new VespaModelTester();
        tester.addHosts(1);
        VespaModel model = tester.createModel(xmlWithNodes, true, deployStateWithClusterEndpoints("container1"));

        assertEquals(1, model.hostSystem().getHosts().size());
        HostResource host = model.hostSystem().getHosts().iterator().next();

        assertTrue(host.spec().membership().isPresent());
        assertEquals("container", host.spec().membership().get().cluster().type().name());
        assertEquals("container1", host.spec().membership().get().cluster().id().value());
    }
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