private static List<ServiceInfo> createServices(int serviceCount) {
        List<ServiceInfo> services = new ArrayList<>();

        IntStream.range(0, serviceCount)
                .forEach(i -> services.add(new ServiceInfo("serviceName" + i,
                                                           i == 0 ? "searchnode" : "container",
                                                           null,
                                                           Map.of("clustername", "cluster" + i),
                                                           "configId" + i,
                                                           "hostName" + i)));

        return services;
    }
Create the given number of hosts using the supplied versions--the last version is repeated as needed.
configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployTest.java