CopyPresenter extends SubversionActionPresenter implements CopyView.ActionDelegate { public void showCopy(ResourceBasedNode<?> sourceNode) { if (sourceNode == null) { return; } this.sourceNode = sourceNode; if (sourceNode instanceof FileReferenceNode) { view.setDialogTitle(constants.copyViewTitleFile()); } else if (sourceNode instanceof FolderReferenceNode || sourceNode instanceof ProjectDescriptorNode) { view.setDialogTitle(constants.copyViewTitleDirectory()); } targetHolder.name = sourceNode.getName(); view.setNewName(targetHolder.name); view.setComment(targetHolder.name); view.setSourcePath(getStorableNodePath(sourceNode), false); validate(); view.show(); } @Inject protected  CopyPresenter(AppContext appContext,
                            EventBus eventBus,
                            RawOutputPresenter console,
                            WorkspaceAgent workspaceAgent,
                            CopyView view,
                            NotificationManager notificationManager,
                            SubversionClientService service,
                            DtoUnmarshallerFactory dtoUnmarshallerFactory,
                            SubversionExtensionLocalizationConstants constants,
                            final ProjectExplorerPresenter projectExplorerPart); void showCopy(ResourceBasedNode<?> sourceNode); @Override void onCopyClicked(); @Override void onNewNameChanged(String newName); @Override void onCancelClicked(); @Override void onNodeSelected(ResourceBasedNode<?> destinationNode); @Override void onSourcePathChanged(); @Override void onTargetUrlChanged(); @Override void onSourceCheckBoxChanged(); @Override void onTargetCheckBoxChanged(); @Override void minimize(); @Override void activatePart(); @Override void onNodeExpanded(final ResourceBasedNode<?> node);  }
@Test public void testCopyViewShouldBeShowed() throws Exception { when(treeStructureProvider.get()).thenReturn(filteredTreeStructure); presenter.showCopy(mock(FileReferenceNode.class)); verify(copyView).show(); }