class CategoryUtils {

    public List<SelectOption> createCategories() {
        List<SelectOption> options = new ArrayList<>();
        options.add(new SelectOptionImpl("ALL",
                                         ts.getTranslation(LibraryConstants.ALL)));
        options.addAll(categoriesManagerCache.getCategories().stream()
                               .map(category -> new SelectOptionImpl(category.getName(),
                                                                     ts.getTranslation(category.getName())))
                               .collect(Collectors.toList()));
        return options;
    }

    public  CategoryUtils();
    @Inject public  CategoryUtils(CategoriesManagerCache categoriesManagerCache,
                         TranslationService ts);

}