in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/JsonRenderingTest.java [76:93]
public void testRecursiveOneLevel() throws IOException {
final Map<String, String> props = new HashMap<String, String>();
props.put("text", testText);
final String parentNodeUrl = testClient.createNode(postUrl, props);
final String[] children = {"A", "B", "C"};
for (String child : children) {
props.put("child", child);
testClient.createNode(parentNodeUrl + "/" + child, props);
}
final String json = getContent(parentNodeUrl + ".1.json", CONTENT_TYPE_JSON);
assertJavascript(testText, json, "out.print(data.text)");
for (String child : children) {
assertJavascript(child, json, "out.print(data[\"" + child + "\"].child)");
assertJavascript(testText, json, "out.print(data[\"" + child + "\"].text)");
}
}