@Test
    public void allow_unretire_nodes_allocated_through_type_spec() {
        ProvisioningTester tester = new ProvisioningTester.Builder().zone(new Zone(Environment.prod, RegionName.from("us-east"))).build();
        tester.makeReadyHosts(10, defaultResources).activateTenantHosts();

        NodeList list = tester.nodeRepository().nodes().list();
        assertEquals(10, list.state(Node.State.active).nodeType(NodeType.host).size());

        // Pick out 5 random nodes and retire those
        Set<String> retiredHostnames = list.shuffle(new Random()).first(5).hostnames();
        tester.patchNodes(node -> retiredHostnames.contains(node.hostname()), node -> node.withWantToRetire(true, Agent.system, tester.clock().instant()));
        tester.activateTenantHosts();

        assertEquals(retiredHostnames, tester.nodeRepository().nodes().list().retired().hostnames());

        Set<String> unretiredHostnames = retiredHostnames.stream().limit(2).collect(Collectors.toSet());
        tester.patchNodes(node -> unretiredHostnames.contains(node.hostname()), node -> node.withWantToRetire(false, Agent.system, tester.clock().instant()));
        tester.activateTenantHosts();

        assertEquals(3, tester.nodeRepository().nodes().list().retired().size());
    }
Test always uses the zone default resources
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/provisioning/ProvisioningTest.java