@Test
    public void patch_wireguard_pubkey() throws IOException {
        assertFile(new Request("http://localhost:8080/nodes/v2/node/host4.yahoo.com"), "node4.json");

        tester.assertResponse(new Request("http://localhost:8080/nodes/v2/node/host4.yahoo.com",
                        Utf8.toBytes("{\"wireguard\":{\"key\": \"not a wg key\"}}"), Request.Method.PATCH), 400,
                "{\"error-code\":\"BAD_REQUEST\",\"message\":\"Could not set field 'wireguard': Wireguard key must match '^[A-Za-z0-9+/]{42}[AEIMQUYcgkosw480]=$', but got: 'not a wg key'\"}");

        assertResponse(new Request("http://localhost:8080/nodes/v2/node/host4.yahoo.com",
                        Utf8.toBytes("{\"wireguard\":{\"key\": \"lololololololololololololololololololololoo=\"}}"), Request.Method.PATCH),
                "{\"message\":\"Updated host4.yahoo.com\"}");

        assertFile(new Request("http://localhost:8080/nodes/v2/node/host4.yahoo.com"), "node4-wg.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