ResetToCommitPresenter implements ResetToCommitView.ActionDelegate { @Override public void onCancelClicked() { view.close(); } @Inject  ResetToCommitPresenter(ResetToCommitView view,
                                  GitServiceClient service,
                                  GitLocalizationConstant constant,
                                  GitOutputPartPresenter console,
                                  EditorAgent editorAgent,
                                  AppContext appContext,
                                  NotificationManager notificationManager,
                                  DtoUnmarshallerFactory dtoUnmarshallerFactory,
                                  ProjectExplorerPresenter projectExplorer,
                                  EventBus eventBus,
                                  ProjectServiceClient projectService); void showDialog(); @Override void onResetClicked(); @Override void onCancelClicked(); @Override void onRevisionSelected(@NotNull Revision revision);  }
@Test public void testOnCancelClicked() throws Exception { presenter.onCancelClicked(); verify(view).close(); }