### Question:
DependenciesPresenter extends Section<ProjectScreenModel> { void add(final Dependency dependency) { enhancedDependenciesManager.addNew(dependency); } @Inject  DependenciesPresenter(final View view,
                                 final Promises promises,
                                 final MenuItem<ProjectScreenModel> menuItem,
                                 final DependencySelectorPopup dependencySelectorPopup,
                                 final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                 final EnhancedDependenciesManager enhancedDependenciesManager,
                                 final ManagedInstance<DependenciesItemPresenter> presenters); @Override Promise<Void> setup(final ProjectScreenModel model); @Override Promise<Object> validate(); void addNewDependency(); void addAllToWhiteList(final Set<String> packages); void removeAllFromWhiteList(final Set<String> packages); void addFromRepository(); void remove(final EnhancedDependency enhancedDependency); @Override int currentHashCode(); @Override SectionView<?> getView();  }### Answer:
@Test public void testAdd() { dependenciesPresenter.addNewDependency(); verify(enhancedDependenciesManager).addNew(new Dependency()); verify(settingsSectionChangeEvent).fire(any()); }
@Test public void testAddDependency() { final Dependency dependency = mock(Dependency.class); dependenciesPresenter.add(dependency); verify(enhancedDependenciesManager).addNew(eq(dependency)); }