@Test
    @Timeout(600)
    void testEventStreamRendering() throws ExecutionException, InterruptedException {
        var tokenStream = new EventStream();
        tokenStream.add("token1");
        tokenStream.add("token2");
        tokenStream.markComplete();

        var hitGroup = new HitGroup("token_stream");
        hitGroup.add(tokenStream);
        var result = render(new Result(new Query(), hitGroup));

        String expected = "{" +
                "\"root\":{" +
                    "\"id\":\"token_stream\"," +
                    "\"relevance\":1.0," +
                    "\"fields\":{" +
                        "\"totalCount\":0" +
                    "}," +
                    "\"children\":[{" +
                        "\"id\":\"event_stream\"," +
                        "\"relevance\":1.0," +
                        "\"children\":[{" +
                            "\"id\":\"1\"," +
                            "\"relevance\":1.0," +
                            "\"fields\":{" +
                                "\"token\":\"token1\"" +
                            "}},{" +
                            "\"id\":\"2\"," +
                            "\"relevance\":1.0," +
                            "\"fields\":{" +
                                "\"token\":\"token2\"" +
                            "}}" +
                        "]}]" +
                    "}" +
                "}";
        assertEqualJson(expected, result);
    }
Functional testing of {@link JsonRenderer}.

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