@Test
    public void testThatAllowedConfigChangeActionsAreActedUpon() {
        List<Host> hosts = createHosts(9, "6.1.0");
        List<ServiceInfo> searchServices = List.of(new ServiceInfo("proton", "searchnode", null, Map.of("clustername", "music"), "configid", "host"));
        List<ServiceInfo> containerServices = List.of(new ServiceInfo("jdisc", "container", null, Map.of("clustername", "container"), "configid", "host"));

        ManualClock clock = new ManualClock(Instant.EPOCH);
        List<ModelFactory> modelFactories = List.of(
                new ConfigChangeActionsModelFactory(Version.fromString("6.1.0"),
                                                    VespaReindexAction.of(ClusterSpec.Id.from("music"), ValidationId.indexModeChange,
                                                                          "reindex please", searchServices, "music"),
                                                    new VespaRestartAction(ClusterSpec.Id.from("container"), "change", containerServices)));

        DeployTester tester = new DeployTester.Builder(temporaryFolder)
                .modelFactories(modelFactories)
                .clock(clock)
                .zone(prodZone)
                .hostProvisioner(new InMemoryProvisioner(new Hosts(hosts), true, false))
                .configConvergenceChecker(new MockConfigConvergenceChecker(2))
                .hostedConfigserverConfig(prodZone)
                .build();
        PrepareResult prepareResult = tester.deployApp("src/test/apps/hosted/", "6.1.0");

        assertEquals(9, tester.getAllocatedHostsOf(tester.applicationId()).getHosts().size());
        assertTrue(prepareResult.configChangeActions().getRestartActions().isEmpty()); // Handled by deployment.
        assertEquals(Optional.of(ApplicationReindexing.empty()
                                                      .withPending("music", "music", prepareResult.sessionId())),
                     tester.tenant().getApplicationRepo().database().readReindexingStatus(tester.applicationId()));
    }
Test that deploying an application works when there are no allocated hosts in the system
(the bootstrap a new zone case, so deploying the routing app since that is the first deployment
that will be done)
configserver/src/test/java/com/yahoo/vespa/config/server/deploy/HostedDeployTest.java