DeploymentsTaskEventListenersPresenter extends Section<DeploymentDescriptorModel> { @Override public Promise<Void> setup(final DeploymentDescriptorModel model) { if (model.getTaskEventListeners() == null) { model.setTaskEventListeners(new ArrayList<>()); } taskEventListenerPresenters.setup( view.getTaskEventListenersTable(), model.getTaskEventListeners(), (eventListener, presenter) -> presenter.setup(eventListener, this)); return promises.resolve(); } @Inject  DeploymentsTaskEventListenersPresenter(final Event<SettingsSectionChange<DeploymentDescriptorModel>> settingsSectionChangeEvent,
                                                  final MenuItem<DeploymentDescriptorModel> menuItem,
                                                  final Promises promises,
                                                  final DeploymentsTaskEventListenersView view,
                                                  final TaskEventListenersListPresenter taskEventListenerPresenters,
                                                  final ItemObjectModelFactory itemObjectModelFactory); @PostConstruct void init(); @Override Promise<Void> setup(final DeploymentDescriptorModel model); void addNewTaskEventListener(); @Override SectionView<?> getView(); @Override int currentHashCode();  }
@Test public void testSetup() { final DeploymentDescriptorModel model = new DeploymentDescriptorModel(); presenter.setup(model); assertNotNull(model.getTaskEventListeners()); verify(taskEventListenersListPresenter).setup(any(), any(), any()); }