@Test
    @Timeout(300)
    void testCoverage() throws InterruptedException, ExecutionException, IOException {
        String expected = "{"
                + "    \"root\": {"
                + "        \"coverage\": {"
                + "            \"coverage\": 83,"
                + "            \"documents\": 500,"
                + "            \"degraded\" : {"
                + "                \"match-phase\" : true,"
                + "                \"timeout\" : false,"
                + "                \"adaptive-timeout\" : true,"
                + "                \"non-ideal-state\" : false"
                + "            },"
                + "            \"full\": false,"
                + "            \"nodes\": 1,"
                + "            \"results\": 1,"
                + "            \"resultsFull\": 0"
                + "        },"
                + "        \"fields\": {"
                + "            \"totalCount\": 0"
                + "        },"
                + "        \"id\": \"toplevel\","
                + "        \"relevance\": 1.0"
                + "    }"
                + "}";
        Query q = new Query("/?query=a&tracelevel=5");
        Execution execution = new Execution(Execution.Context.createContextStub());
        Result r = new Result(q);
        r.setCoverage(new Coverage(500, 600, 1).setDegradedReason(5));

        String summary = render(execution, 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