public Autoscaling autoscale(ApplicationId applicationId, ClusterSpec cluster, Capacity capacity) {
        var capacityPolicies = provisioningTester.nodeRepository().capacityPoliciesFor(applicationId);
        capacity = capacityPolicies.applyOn(capacity, capacityPolicies.decideExclusivity(capacity, cluster).isExclusive());
        Application application = nodeRepository().applications().get(applicationId).orElse(Application.empty(applicationId))
                                                  .withCluster(cluster.id(), false, capacity);
        try (Mutex lock = nodeRepository().applications().lock(applicationId)) {
            nodeRepository().applications().put(application, lock);
        }
        return autoscaler.autoscale(application, application.clusters().get(cluster.id()),
                                    nodeRepository().nodes().list(Node.State.active).owner(applicationId), true, false);
    }
Creates a single redeployment event with bogus data except for the given duration
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/DynamicProvisioningTester.java