ImmutableNode c3 =
new ImmutableNode.Builder().name("child_other").create();
parentBuilder.addChildren(Arrays.asList(c1, c2, c3));
ImmutableNode parent = parentBuilder.create();
NodeHandler<ImmutableNode> testHandler =
new InMemoryNodeModel(parent).getNodeHandler();
XPathExpressionEngine engine = new XPathExpressionEngine();
assertEquals("Wrong key 1", "parent/child[1]",
engine.canonicalKey(c1, "parent", testHandler));
assertEquals("Wrong key 2", "parent/child[2]",
engine.canonicalKey(c2, "parent", testHandler));