RemoveFromIndexPresenter implements RemoveFromIndexView.ActionDelegate { @Override public void onCancelClicked() { view.close(); } @Inject  RemoveFromIndexPresenter(RemoveFromIndexView view,
                                    EventBus eventBus,
                                    GitServiceClient service,
                                    GitOutputPartPresenter console,
                                    GitLocalizationConstant constant,
                                    AppContext appContext,
                                    SelectionAgent selectionAgent,
                                    NotificationManager notificationManager,
                                    EditorAgent editorAgent,
                                    ProjectExplorerPresenter projectExplorer); void showDialog(); @Override void onRemoveClicked(); @Override void onCancelClicked();  }
@Test public void testOnCancelClicked() throws Exception { presenter.onCancelClicked(); verify(view).close(); }