DeploymentsWorkItemHandlersPresenter extends Section<DeploymentDescriptorModel> { @Override public Promise<Void> setup(final DeploymentDescriptorModel model) { if (model.getWorkItemHandlers() == null) { model.setWorkItemHandlers(new ArrayList<>()); } workItemHandlersListPresenter.setup( view.getWorkItemHandlersTable(), model.getWorkItemHandlers(), (workItemHandler, presenter) -> presenter.setup(workItemHandler, this)); return promises.resolve(); } @Inject  DeploymentsWorkItemHandlersPresenter(final Event<SettingsSectionChange<DeploymentDescriptorModel>> settingsSectionChangeEvent,
                                                final MenuItem<DeploymentDescriptorModel> menuItem,
                                                final Promises promises,
                                                final DeploymentsWorkItemHandlersView view,
                                                final WorkItemHandlersListPresenter workItemHandlersListPresenter,
                                                final ItemObjectModelFactory itemObjectModelFactory); @PostConstruct void init(); @Override Promise<Void> setup(final DeploymentDescriptorModel model); void addNewWorkItemHandler(); @Override SectionView<?> getView(); @Override int currentHashCode();  }
@Test public void testSetup() { final DeploymentDescriptorModel model = new DeploymentDescriptorModel(); presenter.setup(model); assertNotNull(model.getWorkItemHandlers()); verify(workItemHandlersListPresenter).setup(any(), eq(model.getWorkItemHandlers()), any()); }