@Test
public void testFirstItemIndirectRecursiveIssue() throws Exception {

    when(navigationServices.loadNavTree()).thenReturn(new NavTreeBuilder()
            .group("groupA", "", "", true)
            .item("itemA", "", "", true, NavWorkbenchCtx.perspective("C"))
            .endGroup()
            .group("groupC", "", "", true)
            .item("itemC", "", "", true, NavWorkbenchCtx.perspective("A"))
            .endGroup()
            .build());
    LayoutRecursionIssue info = layoutTemplateAnalyzer.analyzeRecursion(layoutC);
    assertEquals(info.getRefList().size(), 8);
    assertEquals(info.getRefList().get(0), new LayoutNavigationRef(PERSPECTIVE, "C"));
    assertEquals(info.getRefList().get(1), new LayoutNavigationRef(NAV_COMPONENT, TABLIST.getFQClassName()));
    assertEquals(info.getRefList().get(2), new LayoutNavigationRef(NAV_GROUP_DEFINED, "groupC"));
    assertEquals(info.getRefList().get(3), new LayoutNavigationRef(DEFAULT_ITEM_FOUND, "itemC"));
    assertEquals(info.getRefList().get(4), new LayoutNavigationRef(PERSPECTIVE, "A"));
    assertEquals(info.getRefList().get(5), new LayoutNavigationRef(NAV_COMPONENT, CAROUSEL.getFQClassName()));
    assertEquals(info.getRefList().get(6), new LayoutNavigationRef(NAV_GROUP_DEFINED, "groupA"));
    assertEquals(info.getRefList().get(7), new LayoutNavigationRef(PERSPECTIVE, "C"));
}