### Question:
PopulatedLibraryScreen { public void onAssetListUpdated(@Observes @Routed ProjectAssetListUpdated event) { if (event.getProject().getSpace().equals(getOrganizationalUnit().getSpace())) { findTile(event.getProject()) .ifPresent(this::updateAssetCount); } } @Inject  PopulatedLibraryScreen(final View view,
                                  final LibraryPlaces libraryPlaces,
                                  final Caller<LibraryService> libraryService,
                                  final ProjectController projectController,
                                  final WorkspaceProjectContext projectContext,
                                  final ManagedInstance<TileWidget<WorkspaceProject>> tileWidgets,
                                  final AddProjectButtonPresenter addProjectButtonPresenter,
                                  final Event<ProjectCountUpdate> projectCountUpdateEvent); @PostConstruct void setup(); List<TileWidget<WorkspaceProject>> filterProjects(final String filter); boolean userCanCreateProjects(); int getProjectsCount(); View getView(); void onNewProjectEvent(@Observes NewProjectEvent e); void onRepositoryRemovedEvent(@Observes RepositoryRemovedEvent e); void onAssetListUpdated(@Observes @Routed ProjectAssetListUpdated event);  }### Answer:
@Test public void testOnAssetListUpdated() { setupProjectContext(SPACE_NAME); libraryScreen.onAssetListUpdated(new ProjectAssetListUpdated(project1)); ArgumentCaptor<WorkspaceProject> projectCaptor = ArgumentCaptor.forClass(WorkspaceProject.class); verify(libraryService, times(4)).getNumberOfAssets(projectCaptor.capture()); Assert.assertSame(project1, projectCaptor.getValue()); verify(libraryScreen.libraryTiles.first(), times(2)).setNumberOfAssets(anyInt()); }
@Test public void testOnAssetListUpdatedDifferentSpace() { libraryScreen.onAssetListUpdated(createAssetListUpdatedEvent(SPACE_NAME, "project4Name")); verify(libraryService, times(3)).getNumberOfAssets(any(WorkspaceProject.class)); }