LayoutTemplateAnalyzer { public boolean hasNavigationComponents(LayoutTemplate layoutTemplate) { for (LayoutRow row : layoutTemplate.getRows()) { boolean hasNavComps = hasNavigationComponents(row); if (hasNavComps) { return true; } } return false; } LayoutTemplateAnalyzer(); @Inject  LayoutTemplateAnalyzer(PerspectivePluginServicesImpl pluginServices, NavigationServicesImpl navigationServices); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate); LayoutRecursionIssue analyzeRecursion(LayoutTemplate layoutTemplate, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutTemplate layoutTemplate, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(LayoutRow row, LayoutRecursionIssue issue, LayoutTemplateContext layoutCtx); boolean analyzeRecursion(NavGroup navGroup, LayoutNavigationRefType navGroupRefType, LayoutRecursionIssue issue); boolean analyzeRecursion(String perspectiveId, LayoutRecursionIssue issue); boolean hasNavigationComponents(LayoutTemplate layoutTemplate); boolean hasNavigationComponents(LayoutRow row);  }
@Test public void testHasNavigationComponents() throws Exception { assertTrue(layoutTemplateAnalyzer.hasNavigationComponents(layoutA)); assertTrue(layoutTemplateAnalyzer.hasNavigationComponents(layoutB)); assertTrue(layoutTemplateAnalyzer.hasNavigationComponents(layoutC)); assertTrue(layoutTemplateAnalyzer.hasNavigationComponents(layoutD)); assertFalse(layoutTemplateAnalyzer.hasNavigationComponents(layoutE)); }