DeploymentsGeneralSettingsPresenter extends Section<DeploymentDescriptorModel> { public void setPersistenceUnitName(final String persistenceUnitName) { model.setPersistenceUnitName(persistenceUnitName); fireChangeEvent(); } @Inject  DeploymentsGeneralSettingsPresenter(final Event<SettingsSectionChange<DeploymentDescriptorModel>> settingsSectionChangeEvent,
                                               final MenuItem<DeploymentDescriptorModel> menuItem,
                                               final Promises promises,
                                               final DeploymentsGeneralSettingsView view); @PostConstruct void init(); @Override Promise<Void> setup(final DeploymentDescriptorModel model); void setPersistenceUnitName(final String persistenceUnitName); void setAuditPersistenceUnitName(final String auditPersistenceUnitName); @Override SectionView<?> getView(); @Override int currentHashCode();  }
@Test public void testSetPersistenceUnitName() { final DeploymentDescriptorModel model = new DeploymentDescriptorModel(); presenter.model = model; presenter.setPersistenceUnitName("Name"); assertEquals("Name", model.getPersistenceUnitName()); verify(presenter).fireChangeEvent(); }