@Test
    public void parking_by_operator_cancels_retirement() {
        NodeRepositoryTester tester = new NodeRepositoryTester();
        String hostname = "host1";
        tester.addHost(hostname, hostname, "default", NodeType.host);
        tester.nodeRepository().nodes().deprovision(hostname, Agent.system, tester.clock().instant());

        Node host1 = tester.nodeRepository().nodes().node(hostname).get();
        assertTrue(host1.status().wantToRetire());
        assertTrue(host1.status().wantToDeprovision());

        tester.nodeRepository().nodes().park(hostname, false, Agent.operator, getClass().getSimpleName());
        host1 = tester.nodeRepository().nodes().node(hostname).get();
        assertFalse(host1.status().wantToRetire());
        assertFalse(host1.status().wantToDeprovision());
        assertSame(Node.State.parked, host1.state());
    }
tests basic operation of the node repository

@author bratseth
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/NodeRepositoryTest.java