@Test
    void testWithData() {
        byte[] d1 = {(byte) 0x41, (byte) 0x42, (byte) 0x43};
        byte[] d2 = {(byte) 0x00, (byte) 0x01, (byte) 0x00, (byte) 0x02};
        byte[] d3 = {(byte) 0x12, (byte) 0x34};
        byte[] d4 = {(byte) 0xff, (byte) 0x80, (byte) 0x7f};
        Inspector top = new Value.ObjectValue()
                .put("simple", new Value.DataValue(d1))
                .put("array", new Value.ArrayValue()
                        .add(new Value.DataValue(d2))
                        .add(new Value.DataValue(d3))
                        .add(new Value.DataValue(d4)));
        JSONString js = new JSONString(top);
        String correct = "\n"
                + "      <struct-field name=\"simple\">"
                + "<data length=\"3\" encoding=\"hex\">414243</data>"
                + "</struct-field>\n"
                + "      <struct-field name=\"array\">\n"
                + "        <item>"
                + "<data length=\"4\" encoding=\"hex\">00010002</data>"
                + "</item>\n"
                + "        <item>"
                + "<data length=\"2\" encoding=\"hex\">1234</data>"
                + "</item>\n"
                + "        <item>"
                + "<data length=\"3\" encoding=\"hex\">FF807F</data>"
                + "</item>\n"
                + "      </struct-field>\n    ";
        assertEquals(correct, js.renderFromInspector());
    }
Tests the JSONString XML rendering.

TODO: Add correct answers. These are not added because this code was checked in before sync with system test

@author Steinar Knutsen
container-search/src/test/java/com/yahoo/prelude/hitfield/test/JSONStringTestCase.java