GraphNode node = new GraphNode(new BNode(), new SimpleMGraph());
contextProvider.addUserContext(node);
Iterator<Resource> iter = node.getObjects(GLOBALMENU.globalMenu);
Assert.assertTrue(iter.hasNext());
TripleCollection graph = node.getGraph();
RdfList list = new RdfList((NonLiteral)iter.next(), graph);
Assert.assertEquals(3, list.size());
Assert.assertEquals(GlobalMenuItemsProviderA.groupALabel,
getLabel(graph, list.get(0)));
Assert.assertEquals(GlobalMenuItemsProviderA.groupCLabel,
getLabel(graph, list.get(1)));
Assert.assertEquals(GlobalMenuItemsProviderA.implicitGroupBLabel,
getLabel(graph, list.get(2)));
Assert.assertEquals(GLOBALMENU.Menu, getRdfType(graph, list.get(0)));
Assert.assertEquals(GLOBALMENU.MenuItem, getRdfType(graph, list.get(1)));
Assert.assertEquals(GlobalMenuItemsProviderA.groupAPath,
getPath(graph, list.get(0)));
RdfList children = getChildren(graph, list.get(0));
Assert.assertEquals(2, children.size());
Assert.assertEquals(GlobalMenuItemsProviderA.itemA2Label,
getLabel(graph, children.get(0)));
Assert.assertEquals(GlobalMenuItemsProviderA.itemA1Label,
getLabel(graph, children.get(1)));
Assert.assertEquals(GlobalMenuItemsProviderA.itemA2Path,
getPath(graph, children.get(0)));
}