request.setMethod("GET");
request.setResourceResolver(resolver);
request.setResource(resolver.getResource(path));
MockSlingHttpServletResponse response = new MockSlingHttpServletResponse();
JsonRendererServlet servlet = new JsonRendererServlet(1000);
PrivateAccessor.invoke(servlet, "doGet",
new Class[]{SlingHttpServletRequest.class, SlingHttpServletResponse.class},
new Object[]{request, response});
return response.getOutput().toString();
}