public void deactivate(ApplicationId applicationId) {
        try (var lock = nodeRepository.applications().lock(applicationId)) {
            NestedTransaction deactivateTransaction = new NestedTransaction();
            nodeRepository.remove(new ApplicationTransaction(new ApplicationMutex(applicationId, lock),
                                                             deactivateTransaction));
            deactivateTransaction.commit();
        }
    }
Remove all resources allocated to application
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTester.java