@Test
public void shouldDelegateToParentForAncestorOfDegreeGreaterThanOne() {

    parent = mock(Path.class);
    when(parent.getAncestor(anyInt())).thenReturn(null);
    path = new ChildPath(parent, segment("d"));
    for (int i = 2; i != 10; ++i) {
        path.getAncestor(i);
        verify(parent).getAncestor(i - 1);
    }
}