@Test
public void shouldHavePath() throws Exception {

    assertThat(altima.getPath(), is("/Cars/Hybrid/Nissan Altima"));
    javax.jcr.Node altima2 = hybrid.addNode("Nissan Altima");
    try {
        assertThat(altima2, is(notNullValue()));
        assertThat(altima2.getPath(), is("/Cars/Hybrid/Nissan Altima[2]"));
    } finally {
        altima2.remove(); // remove the node we added in this test to not interfere with other tests
    }
}