class AddAssetScreen {

    protected List<NewResourceHandler> filterAndSortHandlers(List<NewResourceHandler> handlers,
                                                             String textFilter,
                                                             Category category) {
        Stream<NewResourceHandler> filtered = handlers
                .stream()
                .filter(handler -> handler.getDescription().toLowerCase().contains(textFilter.toLowerCase()));
        if (!category.equals(new Undefined())) {
            filtered = filtered.filter(resourceHandler -> category.equals(resourceHandler.getResourceType().getCategory()));
        }
        return filtered.sorted(Comparator.comparing(r -> r.getDescription().toLowerCase()))
                .collect(Collectors.toList());
    }

    public  AddAssetScreen();
    @Inject public  AddAssetScreen(final AddAssetScreen.View view,
                          final TranslationService ts,
                          final ResourceHandlerManager resourceHandlerManager,
                          final CategoriesManagerCache categoriesManagerCache,
                          final ManagedInstance<NewAssetHandlerCardWidget> newAssetHandlerCardWidgets,
                          final LibraryConstants libraryConstants,
                          final CategoryUtils categoryUtils,
                          final LibraryPlaces libraryPlaces,
                          final ProfilePreferences profilesPreferences);

}