DeploymentsSectionPresenter extends Section<ProjectScreenModel> { Promise<DeploymentDescriptorModel> loadDeploymentDescriptor() { return promises.promisify(ddEditorService, s -> { s.load(pathToDeploymentsXml); }); } @Inject  DeploymentsSectionPresenter(final View view,
                                       final Promises promises,
                                       final MenuItem<ProjectScreenModel> menuItem,
                                       final WorkspaceProjectContext projectContext,
                                       final Caller<DDEditorService> ddEditorService,
                                       final ManagedInstance<ObservablePath> observablePaths,
                                       final Event<SettingsSectionChange<ProjectScreenModel>> settingsSectionChangeEvent,
                                       final Event<NotificationEvent> notificationEvent,
                                       final SectionManager<DeploymentDescriptorModel> sectionManager,
                                       final DeploymentsSections deploymentsSections); @PostConstruct void init(); @Override Promise<Void> setup(final ProjectScreenModel ignore); @Override Promise<Void> save(final String comment,
                              final Supplier<Promise<Void>> chain); void onSectionChanged(@Observes final SettingsSectionChange<DeploymentDescriptorModel> settingsSectionChange); @Override int currentHashCode(); @Override SectionView<?> getView();  }
@Test public void testLoadDeploymentDescriptor() { doReturn(mock(Path.class)).when(ddEditorService).load(any()); presenter.loadDeploymentDescriptor().catch_(i -> { Assert.fail("Promise should've been resolved!"); return promises.resolve(); }); verify(ddEditorService).load(any()); }