DecisionTableXLSEditorPresenter extends KieEditor<DecisionTableXLSContent> implements DecisionTableXLSEditorView.Presenter { @Override public void onUploadSuccess() { versionRecordManager.reloadVersions(versionRecordManager.getPathToLatest()); } @Inject  DecisionTableXLSEditorPresenter(final DecisionTableXLSEditorView baseView,
                                           final DecisionTableXLSResourceType decisionTableXLSResourceType,
                                           final DecisionTableXLSXResourceType decisionTableXLSXResourceType,
                                           final BusyIndicatorView busyIndicatorView,
                                           final ValidationPopup validationPopup,
                                           final Caller<DecisionTableXLSService> decisionTableXLSService,
                                           final Caller<MetadataService> metadataService); @OnStartup void onStartup(final ObservablePath path,
                          final PlaceRequest place); @Override void onUpload(); @Override void onUploadSuccess(); @Override void onSourceTabSelected(); @OnClose @Override void onClose(); @WorkbenchPartTitleDecoration IsWidget getTitle(); @WorkbenchPartTitle String getTitleText(); @WorkbenchPartView IsWidget getWidget(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); static final String EDITOR_ID; }
@Test public void testOnUploadSuccess() { final ObservablePath path = mock(ObservablePath.class); doReturn(null).when(versionRecordManager).getCurrentPath(); doReturn(path).when(versionRecordManager).getPathToLatest(); presenter.onUploadSuccess(); verify(versionRecordManager).getPathToLatest(); verify(versionRecordManager, never()).getCurrentPath(); verify(versionRecordManager).reloadVersions(path); }