@Test
    @Timeout(300)
    void testJsonObjects() throws InterruptedException, ExecutionException, IOException {
        String expected = "{"
                + "    \"root\": {"
                + "        \"children\": ["
                + "            {"
                + "                \"fields\": {"
                + "                    \"inspectable\": {"
                + "                        \"a\": \"b\""
                + "                    },"
                + "                    \"jackson\": {"
                + "                        \"Nineteen-eighty-four\": 1984"
                + "                    },"
                + "                    \"json producer\": {"
                + "                        \"long in structured\": 7809531904"
                + "                    }"
                + "                },"
                + "                \"id\": \"json objects\","
                + "                \"relevance\": 1.0"
                + "            }"
                + "        ],"
                + "        \"fields\": {"
                + "            \"totalCount\": 0"
                + "        },"
                + "        \"id\": \"toplevel\","
                + "        \"relevance\": 1.0"
                + "    }"
                + "}";
        Result r = newEmptyResult();
        Hit h = new Hit("json objects");
        ObjectNode j = Jackson.mapper().createObjectNode();
        JSONString s = new JSONString("{\"a\": \"b\"}");
        Slime slime = new Slime();
        Cursor c = slime.setObject();
        c.setLong("long in structured", 7809531904L);
        SlimeAdapter slimeInit = new SlimeAdapter(slime.get());
        StructuredData struct = new StructuredData(slimeInit);
        j.put("Nineteen-eighty-four", 1984);
        h.setField("inspectable", s);
        h.setField("jackson", j);
        h.setField("json producer", struct);
        r.hits().add(h);
        String summary = render(r);
        assertEqualJsonContent(expected, summary);
    }
Functional testing of {@link JsonRenderer}.

@author Steinar Knutsen
@author bratseth
container-search/src/test/java/com/yahoo/search/rendering/JsonRendererTestCase.java