@Test
    public void test_capacity() throws Exception {
        assertFile(new Request("http://localhost:8080/nodes/v2/capacity/?json=true"), "capacity-zone.json");
        assertFile(new Request("http://localhost:8080/nodes/v2/capacity?json=true"), "capacity-zone.json");

        List<String> hostsToRemove = List.of(
                "dockerhost1.yahoo.com",
                "dockerhost2.yahoo.com",
                "dockerhost3.yahoo.com",
                "dockerhost4.yahoo.com"
        );
        String requestUriTemplate = "http://localhost:8080/nodes/v2/capacity/?json=true&hosts=%s";

        assertFile(new Request(String.format(requestUriTemplate,
                                             String.join(",", hostsToRemove.subList(0, 3)))),
                   "capacity-hostremoval-possible.json");
        assertFile(new Request(String.format(requestUriTemplate,
                                             String.join(",", hostsToRemove))),
                   "capacity-hostremoval-impossible.json");
    }
This test gives examples of the node requests that can be made to nodes/v2
node-repository/src/test/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiTest.java