### Question:
PopulatedAssetsScreen { protected ProjectAssetsQuery createProjectQuery(String filter, String filterType, int startIndex, int amount) { Category category = categoriesManagerCache.getCategory(filterType); List<String> suffixes = this.getSuffixes(category); return new ProjectAssetsQuery(libraryPlaces.getActiveWorkspace(), filter, startIndex, amount, suffixes); } @Inject  PopulatedAssetsScreen(final PopulatedAssetsScreen.View view,
                                 final CategoriesManagerCache categoriesManagerCache,
                                 final ResourceTypeManagerCache resourceTypeManagerCache,
                                 final BusyIndicatorView busyIndicatorView,
                                 final LibraryPlaces libraryPlaces,
                                 final TranslationService ts,
                                 final Classifier assetClassifier,
                                 final ManagedInstance<AssetItemWidget> assetItemWidget,
                                 final NewFileUploader newFileUploader,
                                 final NewResourcePresenter newResourcePresenter,
                                 final ProjectController projectController,
                                 final Event<UpdatedAssetsEvent> updatedAssetsEventEvent,
                                 final EmptyState emptyState,
                                 final CategoryUtils categoryUtils,
                                 final DateUtils dateUtils,
                                 final AssetQueryService assetQueryService,
                                 final Event<WorkspaceProjectContextChangeEvent> contextChangeEvent,
                                 final Promises promises); @PostConstruct void init(); void onAssetListUpdated(@Observes @Routed ProjectAssetListUpdated event); void importAsset(); void setFilterType(String filterType); void showSearchHitNothing(); void showEmptyState(String title,
                               String message); void hideEmptyState(); void addAsset(); void nextPage(); void prevPage(); void setCurrentPage(Integer currentPage); void search(String filterText); View getView();  }### Answer:
@Test public void testCreateProjectQuery() { List<String> more = Arrays.asList("xml", "java", "dsl"); String filter = "filter"; Others other = new Others(); doReturn(other).when(this.categoriesManagerCache).getCategory(eq(new Others().getName())); doReturn(more).when(this.populatedAssetsScreen).getSuffixes(eq(other)); { String filterType = "ALL"; ProjectAssetsQuery query = this.populatedAssetsScreen.createProjectQuery(filter, filterType, 0, 10); assertEquals("filter", query.getFilter()); assertThat(query.getExtensions(), is(Collections.emptyList())); } { String filterType = new Others().getName(); ProjectAssetsQuery query = this.populatedAssetsScreen.createProjectQuery(filter, filterType, 0, 10); assertEquals("filter", query.getFilter()); assertThat(query.getExtensions(), is(more)); } }