private String render(Execution execution, Result r) throws InterruptedException, ExecutionException {
        if (renderer == null) createClone();
        try {
            ByteArrayOutputStream bs = new ByteArrayOutputStream();
            CompletableFuture<Boolean> f = renderer.renderResponse(bs, r, execution, null);
            assertTrue(f.get());
            return Utf8.toString(bs.toByteArray());
        } finally {
            deconstructClone();
        }
    }
Functional testing of {@link JsonRenderer}.

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