@Test
public void shouldReturnNthDegreeAncestor() {

    assertThat(path.getAncestor(1), is(pathFactory.create("/mode:a/mode:b")));
    assertThat(path.getAncestor(2), is(pathFactory.create("/mode:a")));
    assertThat(path.getAncestor(3), is(ROOT));
}