private void testContainerOnLogserverHost(String services, boolean useDedicatedNodeForLogserver) {
        int numberOfHosts = 2;
        VespaModelTester tester = new VespaModelTester();
        tester.useDedicatedNodeForLogserver(useDedicatedNodeForLogserver);
        tester.addHosts(numberOfHosts);

        VespaModel model = tester.createModel(Zone.defaultZone(), services, true, deployStateWithClusterEndpoints("foo"));
        assertEquals(numberOfHosts, model.getRoot().hostSystem().getHosts().size());

        Admin admin = model.getAdmin();
        Logserver logserver = admin.getLogserver();
        HostResource hostResource = logserver.getHostResource();
        assertNotNull(hostResource.getService("logserver"));
        String containerServiceType = ContainerServiceType.LOGSERVER_CONTAINER.serviceName;
        assertNotNull(hostResource.getService(containerServiceType));

        // Test that the container gets config
        String configId = admin.getLogserver().getHostResource().getService(containerServiceType).getConfigId();
        ApplicationMetadataConfig.Builder builder = new ApplicationMetadataConfig.Builder();
        model.getConfig(builder, configId);
        ApplicationMetadataConfig cfg = new ApplicationMetadataConfig(builder);
        assertEquals(1, cfg.generation());

        LogdConfig.Builder logdConfigBuilder = new LogdConfig.Builder();
        model.getConfig(logdConfigBuilder, configId);
        LogdConfig logdConfig = new LogdConfig(logdConfigBuilder);
        // Logd should use logserver (forward logs to it)
        assertTrue(logdConfig.logserver().use());
    }
Recreate the combination used in some factory tests
config-model/src/test/java/com/yahoo/config/model/provision/ModelProvisioningTest.java