public String getTitle() {
if (localeToTitle.size() != 1)
- throw new RuntimeException("there shall be exactly one title");
+ throw new RuntimeException(
+ "NavigationItem.getTitle() was called without locale parameter, but there there are multiple titles in diffirent locales available.");
return localeToTitle.values().iterator().next();
}