private Map<ApplicationInstanceReference, ApplicationInstance> getAllApplicationInstances() {
        // Convert apps information to the response payload to return
        Map<ApplicationInstanceReference, ApplicationInstance> status = new HashMap<>();
        for (Map.Entry<ApplicationId, MockDeployer.ApplicationContext> app : apps.entrySet()) {
            Set<ServiceInstance> serviceInstances = new HashSet<>();
            for (Node node : nodeRepository.nodes().list(Node.State.active).owner(app.getValue().id())) {
                serviceInstances.add(new ServiceInstance(new ConfigId("configid"),
                                                         new HostName(node.hostname()),
                                                         getHostStatus(node.hostname())));
            }
            Set<ServiceCluster> serviceClusters = new HashSet<>();
            serviceClusters.add(new ServiceCluster(new ClusterId(app.getValue().clusterContexts().get(0).cluster().id().value()),
                                                   new ServiceType("serviceType"),
                                                   serviceInstances));
            TenantId tenantId = new TenantId(app.getKey().tenant().value());
            ApplicationInstanceId applicationInstanceId = new ApplicationInstanceId(app.getKey().application().value());
            status.put(new ApplicationInstanceReference(tenantId, applicationInstanceId),
                       new ApplicationInstance(tenantId, applicationInstanceId, serviceClusters));
        }
        return status;
    }
Create a service monitor where all nodes are initially up
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/ServiceMonitorStub.java