GuidedDecisionTableModellerPresenter implements GuidedDecisionTableModellerView.Presenter { @Override public GuidedDecisionTableView.Presenter addDecisionTable(final ObservablePath path, final PlaceRequest placeRequest, final GuidedDecisionTableEditorContent content, final boolean isReadOnly, final Double x, final Double y) { final GuidedDecisionTableView.Presenter dtPresenter = dtPresenterProvider.get(); dtPresenter.setContent(path, placeRequest, analysisReportScreen, content, this, isReadOnly); final double dtViewX = (x == null ? getDecisionTableX(dtPresenter) : x); final double dtViewY = (y == null ? getDecisionTableY(dtPresenter) : y); dtPresenter.getView().setLocation(dtViewX, dtViewY); availableDecisionTables.add(dtPresenter); updateLinks(); view.addDecisionTable(dtPresenter.getView()); return dtPresenter; } @Inject  GuidedDecisionTableModellerPresenter(final GuidedDecisionTableModellerView view,
                                                final ManagedInstance<GuidedDecisionTableView.Presenter> dtPresenterProvider,
                                                final GuidedDecisionTableModellerContextMenuSupport contextMenuSupport,
                                                final Event<RadarMenuBuilder.UpdateRadarEvent> updateRadarEvent,
                                                final Event<DecisionTablePinnedEvent> pinnedEvent,
                                                final ColumnHeaderPopOver columnHeaderPopOver); @Override void onClose(); @Override void releaseDecisionTables(); @Override void releaseHandlerRegistrations(); @Override GuidedDecisionTableView.Presenter addDecisionTable(final ObservablePath path,
                                                              final PlaceRequest placeRequest,
                                                              final GuidedDecisionTableEditorContent content,
                                                              final boolean isReadOnly,
                                                              final Double x,
                                                              final Double y); @Override GuidedDecisionTableView.Presenter refreshDecisionTable(final GuidedDecisionTableView.Presenter dtPresenter,
                                                                  final ObservablePath path,
                                                                  final PlaceRequest placeRequest,
                                                                  final GuidedDecisionTableEditorContent content,
                                                                  final boolean isReadOnly); @Override void removeDecisionTable(final GuidedDecisionTableView.Presenter dtPresenter); @Override Optional<GuidedDecisionTableView.Presenter> getActiveDecisionTable(); @Override Set<GuidedDecisionTableView.Presenter> getAvailableDecisionTables(); @Override boolean isDecisionTableAvailable(final GuidedDecisionTableView.Presenter dtPresenter); @Override boolean isActiveDecisionTableEditable(); @Override GuidedDecisionTableModellerView getView(); @Override void setZoom(final int zoom); @Override void enterPinnedMode(final GridWidget gridWidget,
                                final Command onStartCommand); @Override void exitPinnedMode(final Command onCompleteCommand); @Override void updatePinnedContext(final GridWidget gridWidget); @Override PinnedContext getPinnedContext(); @Override boolean isGridPinned(); @Override TransformMediator getDefaultTransformMediator(); @Override void addOnEnterPinnedModeCommand(final Command command); @Override void addOnExitPinnedModeCommand(final Command command); @Override void onDecisionTableSelected(final @Observes DecisionTableSelectedEvent event); @Override void onDecisionTableLinkedColumnSelected(final @Observes DecisionTableColumnSelectedEvent event); @Override void updateRadar(); @Override void onViewPinned(final boolean isPinned); @Override void refreshScrollPosition(); @Override void updateLinks(); @Override void analysisReportScreen(final AnalysisReportScreen analysisReportScreen);  }
@Test public void addDecisionTable() { final ObservablePath path = mock(ObservablePath.class); final PlaceRequest placeRequest = mock(PlaceRequest.class); final GuidedDecisionTableEditorContent dtContent = makeDecisionTableContent(); presenter.addDecisionTable(path, placeRequest, dtContent, false, null, null); verify(presenter, times(1)).updateLinks(); verify(gridLayer, times(1)).refreshGridWidgetConnectors(); verify(view, times(1)).addDecisionTable(eq(dtableView)); }