@Test
    public void want_to_retire_but_cannot_fail() {
        Capacity capacity =       Capacity.from(new ClusterResources(5, 1, defaultResources), false, true);
        Capacity capacityFORCED = Capacity.from(new ClusterResources(5, 1, defaultResources), false, false);

        ProvisioningTester tester = new ProvisioningTester.Builder().zone(new Zone(Environment.prod, RegionName.from("us-east"))).build();

        ApplicationId application = ProvisioningTester.applicationId();

        // Create 10 nodes
        tester.makeReadyHosts(10, defaultResources).activateTenantHosts();
        // Allocate 5 nodes
        ClusterSpec cluster = ClusterSpec.request(ClusterSpec.Type.content, ClusterSpec.Id.from("music")).vespaVersion("4.5.6").build();
        tester.activate(application, tester.prepare(application, cluster, capacity));
        assertEquals(5, tester.nodeRepository().nodes().list(Node.State.active).owner(application).not().retired().size());
        assertEquals(0, tester.nodeRepository().nodes().list(Node.State.active).owner(application).retired().size());

        // Mark the nodes as want to retire
        tester.nodeRepository().nodes().list(Node.State.active).owner(application).forEach(node -> tester.patchNode(node, (n) -> n.withWantToRetire(true, Agent.system, tester.clock().instant())));
        // redeploy without allow failing
        tester.activate(application, tester.prepare(application, cluster, capacityFORCED));

        // Nodes are not retired since that is unsafe when we cannot fail
        assertEquals(5, tester.nodeRepository().nodes().list(Node.State.active).owner(application).not().retired().size());
        assertEquals(0, tester.nodeRepository().nodes().list(Node.State.active).owner(application).retired().size());
        // ... but we still want to
        tester.nodeRepository().nodes().list(Node.State.active).owner(application).forEach(node -> assertTrue(node.status().wantToRetire()));

        // redeploy with allowing failing
        tester.activate(application, tester.prepare(application, cluster, capacity));
        // ... old nodes are now retired
        assertEquals(5, tester.nodeRepository().nodes().list(Node.State.active).owner(application).not().retired().size());
        assertEquals(5, tester.nodeRepository().nodes().list(Node.State.active).owner(application).retired().size());
    }
Test always uses the zone default resources
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTest.java