joomlaJavaApi.createMenuForCategory("Sud America/Colombia");
joomlaJavaApi.createMenuForCategory("Sud America/Colombia/Santa Marta");
List<Menu> menuWithThisPath = menuDao.getMenuWithThisPath(Converter.getPath(categoryPath));
assertThat(menuWithThisPath.size(),is(1));
Menu menu = menuWithThisPath.get(0);
assertThat(menu.getTitle(),is("Santa Marta"));
assertThat(menu.getAccess(),is(1));
assertThat(menu.getAlias(),is("santa-marta"));
menuWithThisPath = menuDao.getMenuWithThisPath("sud-america/colombia");
int expectedParentId = menuWithThisPath.get(0).getId();
int newExpectedParentId = menuWithThisPath.get(0).getParentId();
assertThat(menu.getParentId(), is(expectedParentId));
menuWithThisPath = menuDao.getMenuWithThisPath("sud-america");
assertThat(menuWithThisPath.get(0).getId(),is(newExpectedParentId));
}