DeploymentsEnvironmentEntriesPresenter extends Section<DeploymentDescriptorModel> { @Override public Promise<Void> setup(final DeploymentDescriptorModel model) { if (model.getEnvironmentEntries() == null) { model.setEnvironmentEntries(new ArrayList<>()); } environmentEntriesPresenters.setup( view.getEnvironmentEntriesTable(), model.getEnvironmentEntries(), (environmentEntry, presenter) -> presenter.setup(environmentEntry, this)); return promises.resolve(); } @Inject  DeploymentsEnvironmentEntriesPresenter(final Event<SettingsSectionChange<DeploymentDescriptorModel>> settingsSectionChangeEvent,
                                                  final MenuItem<DeploymentDescriptorModel> menuItem,
                                                  final Promises promises,
                                                  final DeploymentsEnvironmentEntriesView view,
                                                  final EnvironmentEntriesListPresenter environmentEntriesPresenters,
                                                  final ItemObjectModelFactory itemObjectModelFactory); @PostConstruct void init(); @Override Promise<Void> setup(final DeploymentDescriptorModel model); void addNewEnvironmentEntry(); @Override SectionView<?> getView(); @Override int currentHashCode();  }
@Test public void testSetup() { final DeploymentDescriptorModel model = new DeploymentDescriptorModel(); presenter.setup(model); assertNotNull(model.getEnvironmentEntries()); verify(environmentEntriesListPresenter).setup(any(), eq(model.getEnvironmentEntries()), any()); }