JcrNode extends AbstractJcrNode { @Override public int getIndex() throws RepositoryException { return segment().getIndex(); } JcrNode( JcrSession session,
             NodeKey nodeKey ); @Override int getIndex(); @Override String getName(); @Override AbstractJcrNode getParent(); @Override String getPath();  }
@Test public void shouldHaveSameNameSiblingIndex() throws Exception { assertThat(altima.getIndex(), is(1)); javax.jcr.Node altima2 = hybrid.addNode("Nissan Altima"); try { assertThat(altima2, is(notNullValue())); assertThat(altima2.getIndex(), is(2)); } finally { altima2.remove(); } }