DeploymentsEventListenersPresenter extends Section<DeploymentDescriptorModel> { @Override public Promise<Void> setup(final DeploymentDescriptorModel model) { if (model.getEventListeners() == null) { model.setEventListeners(new ArrayList<>()); } eventListenerPresenters.setup( view.getEventListenersTable(), model.getEventListeners(), (eventListener, presenter) -> presenter.setup(eventListener, this)); return promises.resolve(); } @Inject  DeploymentsEventListenersPresenter(final Event<SettingsSectionChange<DeploymentDescriptorModel>> settingsSectionChangeEvent,
                                              final MenuItem<DeploymentDescriptorModel> menuItem,
                                              final Promises promises,
                                              final DeploymentsEventListenersView view,
                                              final EventListenersListPresenter eventListenerPresenters,
                                              final ItemObjectModelFactory itemObjectModelFactory); @PostConstruct void init(); @Override Promise<Void> setup(final DeploymentDescriptorModel model); void addNewEventListener(); @Override SectionView<?> getView(); @Override int currentHashCode();  }
@Test public void testSetup() { final DeploymentDescriptorModel model = new DeploymentDescriptorModel(); presenter.setup(model); assertNotNull(model.getEventListeners()); verify(eventListenersListPresenter).setup(any(), any(), any()); }