@Test
public void traverseNext() throws Exception {

    PerPage root = createPage(null, "root");
    PerPage child1 = createPage(root, "child-1");
    PerPage child2 = createPage(root, "child-2");
    PerPage child11 = createPage(child1, "child-1-1");
    PerPage child12 = createPage(child1, "child-1-2");
    PerPage child13 = createPage(child1, "child-1-3");
    PerPage child111 = createPage(child11, "child-1-1-1");
    PerPage child112 = createPage(child11, "child-1-1-2");
    PerPage child21 = createPage(child2, "child-2-1");
    PerPage child22 = createPage(child2, "child-2-2");
    checkNext("Child-1 was not return as next of Root", child1, root);
    checkNext("Child-11 was not return as next of Child-1", child11, child1);
    checkNext("Child-111 was not return as next of Child-11", child111, child11);
    checkNext("Child-112 was not return as next of Child-111", child112, child111);
    checkNext("Child-12 was not return as next of Child-111", child12, child112);
    checkNext("Child-13 was not return as next of Child-12", child13, child12);
    checkNext("Child-2 was not return as next of Child-13", child2, child13);
    checkNext("Child-21 was not return as next of Child-2", child21, child2);
    checkNext("Child-22 was not return as next of Child-22", child22, child21);
    assertNull("Child-22 must not return a page", child22.getNext());
}