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