public Node fromJson(byte[] data) {
        return nodeFromSlime(SlimeUtils.jsonToSlime(data).get());
    }
@Test
    public void reboot_and_restart_and_type_no_current_values_serialization() {
        String nodeData = 
                "{\n" +
                "   \"type\" : \"tenant\",\n" +
                "   \"state\" : \"provisioned\",\n" +
                "   \"rebootGeneration\" : 1,\n" +
                "   \"currentRebootGeneration\" : 2,\n" +
                "   \"flavor\" : \"large\",\n" +
                "   \"history\" : [\n" +
                "      {\n" +
                "         \"type\" : \"provisioned\",\n" +
                "         \"at\" : 1444391401389,\n" +
                "         \"agent\" : \"system\"\n" +
                "      },\n" +
                "      {\n" +
                "         \"type\" : \"reserved\",\n" +
                "         \"at\" : 1444391402611,\n" +
                "         \"agent\" : \"system\"\n" +
                "      }\n" +
                "   ],\n" +
                "   \"instance\" : {\n" +
                "      \"applicationId\" : \"myApplication\",\n" +
                "      \"tenantId\" : \"myTenant\",\n" +
                "      \"instanceId\" : \"myInstance\",\n" +
                "      \"serviceId\" : \"content/myId/0/0/stateful\",\n" +
                "      \"restartGeneration\" : 3,\n" +
                "      \"currentRestartGeneration\" : 4,\n" +
                "      \"removable\" : true,\n" +
                "      \"wantedVespaVersion\": \"6.42.2\"\n" +
                "   },\n" +
                "   \"openStackId\" : \"myId\",\n" +
                "   \"hostname\" : \"myHostname\",\n" +
                "   \"ipAddresses\" : [\"127.0.0.1\"]\n" +
                "}";

        Node node = nodeSerializer.fromJson(Utf8.toBytes(nodeData));

        assertEquals("large", node.flavor().name());
        assertEquals(1, node.status().reboot().wanted());
        assertEquals(2, node.status().reboot().current());
        assertEquals(3, node.allocation().get().restartGeneration().wanted());
        assertEquals(4, node.allocation().get().restartGeneration().current());
        assertEquals(List.of(History.Event.Type.provisioned, History.Event.Type.reserved),
                     node.history().events().stream().map(History.Event::type).toList());
        assertTrue(node.allocation().get().removable());
        assertEquals(NodeType.tenant, node.type());
    }