private List<Host> createHosts(int count, String ... versions) {
        return IntStream.rangeClosed(1, count)
                        .mapToObj(i -> createHost("host" + i, versions[Math.min(i, versions.length) - 1]))
                        .toList();
    }
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