@Test
    public void only_allow_docker_containers_remove_in_ready() {
        NodeRepositoryTester tester = new NodeRepositoryTester();
        tester.addHost("id1", "host1", "docker", NodeType.tenant);

        try {
            tester.nodeRepository().nodes().removeRecursively("host1"); // host1 is in state provisioned
            fail("Should not be able to delete docker container node by itself in state provisioned");
        } catch (IllegalArgumentException ignored) {
            // Expected
        }

        tester.nodeRepository().nodes().setReady(tester.nodeRepository().nodes().lockAndGetRequired("host1"), Agent.system, getClass().getSimpleName());
        tester.nodeRepository().nodes().removeRecursively("host1");
    }
tests basic operation of the node repository

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