DeploymentsConfigurationPresenter extends Section<DeploymentDescriptorModel> { @Override public Promise<Void> setup(final DeploymentDescriptorModel model) { if (model.getConfiguration() == null) { model.setConfiguration(new ArrayList<>()); } configurationPresenters.setup( view.getConfigurationsTable(), model.getConfiguration(), (global, presenter) -> presenter.setup(global, this)); return promises.resolve(); } @Inject  DeploymentsConfigurationPresenter(final Event<SettingsSectionChange<DeploymentDescriptorModel>> settingsSectionChangeEvent,
                                             final MenuItem<DeploymentDescriptorModel> menuItem,
                                             final Promises promises,
                                             final DeploymentsConfigurationView view,
                                             final ConfigurationsListPresenter configurationPresenters,
                                             final ItemObjectModelFactory itemObjectModelFactory); @PostConstruct void init(); @Override Promise<Void> setup(final DeploymentDescriptorModel model); void addNewConfiguration(); @Override SectionView<?> getView(); @Override int currentHashCode();  }
@Test public void testSetup() { final DeploymentDescriptorModel model = new DeploymentDescriptorModel(); presenter.setup(model); assertNotNull(model.getConfiguration()); verify(configurationsListPresenter).setup(any(), eq(model.getConfiguration()), any()); }