### Question:
EmptyLibraryScreen { public void trySamples() { if (userCanCreateProjects()) { libraryPlaces.goToTrySamples(); } } @Inject  EmptyLibraryScreen(final View view,
                              final AddProjectButtonPresenter addProjectButtonPresenter,
                              final ProjectController projectController,
                              final LibraryPlaces libraryPlaces); @PostConstruct void setup(); void trySamples(); void importProject(); View getView();  }### Answer:
@Test public void trySamplesWithPermissionTest() { emptyLibraryScreen.trySamples(); verify(libraryPlaces).goToTrySamples(); }
@Test public void trySamplesWithoutPermissionTest() { doReturn(false).when(projectController).canCreateProjects(any()); emptyLibraryScreen.trySamples(); verify(libraryPlaces, never()).goToTrySamples(); }