DeploymentsGlobalsPresenter extends Section<DeploymentDescriptorModel> { @Override public Promise<Void> setup(final DeploymentDescriptorModel model) { if (model.getGlobals() == null) { model.setGlobals(new ArrayList<>()); } globalPresenters.setup( view.getGlobalsTable(), model.getGlobals(), (global, presenter) -> presenter.setup(global, this)); return promises.resolve(); } @Inject  DeploymentsGlobalsPresenter(final Event<SettingsSectionChange<DeploymentDescriptorModel>> settingsSectionChangeEvent,
                                       final MenuItem<DeploymentDescriptorModel> menuItem,
                                       final Promises promises,
                                       final DeploymentsGlobalsView view,
                                       final GlobalsListPresenter globalPresenters,
                                       final ItemObjectModelFactory itemObjectModelFactory); @PostConstruct void init(); @Override Promise<Void> setup(final DeploymentDescriptorModel model); void addNewGlobal(); @Override SectionView<?> getView(); @Override int currentHashCode();  }
@Test public void testSetupGlobalsTable() { final DeploymentDescriptorModel model = new DeploymentDescriptorModel(); presenter.setup(model); assertNotNull(model.getGlobals()); verify(globalPresenters).setup(any(), eq(model.getGlobals()), any()); }