### Question:
JcrNode extends AbstractJcrNode { public int getIndex() throws RepositoryException { return segment().getIndex(); } JcrNode( SessionCache cache,
             NodeId nodeId,
             Location location ); int getIndex(); String getName(); @Override AbstractJcrNode getParent(); String getPath();  }### Answer:
@Test public void shouldHaveSameNameSiblingIndex() throws Exception { assertThat(altima.getIndex(), is(1)); javax.jcr.Node altima2 = hybrid.addNode("Nissan Altima"); assertThat(altima2, is(notNullValue())); assertThat(altima2.getIndex(), is(2)); }