// create .content.xml structure
InputStream contentXml = getClass().getResourceAsStream("content-nested-structure.xml");
project.createOrUpdateFile(Path.fromPortableString("jcr_root/content/test-root/en.xml"), contentXml);
// instantiate the content provider
JcrContentContentProvider contentProvider = new JcrContentContentProvider();
// directly create the root node
SyncDir syncDirNode = new SyncDir((IFolder) contentProject.findMember("jcr_root"));
// test children of '/'
Object[] children = contentProvider.getChildren(syncDirNode);
assertChildrenHavePaths(children, "/content");
// test children of '/content'
JcrNode contentNode = (JcrNode) children[0];
Object[] children2 = contentProvider.getChildren(contentNode);
assertChildrenHavePaths(children2, "/content/test-root");
// test children of '/content/test-root'
JcrNode testRootNode = (JcrNode) children2[0];
Object[] children3 = contentProvider.getChildren(testRootNode);
assertChildrenHavePaths(children3, "/content/test-root/en");
// test children of '/content/test-root/en'
JcrNode enNode = (JcrNode) children3[0];
Object[] children4 = contentProvider.getChildren(enNode);
assertChildrenHavePaths(children4, "/content/test-root/en/message", "/content/test-root/en/error",
"/content/test-root/en/warning");
// test children of '/content/test-root/en/message'
JcrNode messageNode = (JcrNode) children4[0];
Object[] children5 = contentProvider.getChildren(messageNode);
assertChildrenHavePaths(children5); // no children
}