LanguageNavigationImpl extends AbstractComponentImpl implements LanguageNavigation { @Override public List<NavigationItem> getItems() { if (items == null) { PageManager pageManager = currentPage.getPageManager(); rootPage = pageManager.getPage(navigationRoot); if (rootPage != null) { int rootPageLevel = rootPage.getDepth(); startLevel = rootPageLevel + 1; structureDepth += rootPageLevel; items = getItems(rootPage); } else { items = Collections.emptyList(); } } return Collections.unmodifiableList(items); }  @Override List<NavigationItem> getItems(); @NotNull @Override String getExportedType(); static final String RESOURCE_TYPE; }
@Test void testLanguageNavigationItemsNoRoot() { LanguageNavigation languageNavigation = getLanguageNavigationUnderTest( NAVIGATION_ROOT + "/LOCALE-1/LOCALE-5/about/jcr:content/root/languagenavigation-component-4"); assertEquals(0, languageNavigation.getItems().size(), "Didn't expect any language navigation items."); Utils.testJSONExport(languageNavigation, Utils.getTestExporterJSONPath(TEST_BASE, "languagenavigation4")); }