CommitPresenter implements CommitView.ActionDelegate { @Override public void onCancelClicked() { view.close(); } @Inject  CommitPresenter(CommitView view,
                           GitServiceClient service,
                           GitLocalizationConstant constant,
                           GitOutputPartPresenter console,
                           NotificationManager notificationManager,
                           DtoUnmarshallerFactory dtoUnmarshallerFactory,
                           AppContext appContext,
                           DateTimeFormatter dateTimeFormatter,
                           final SelectionAgent selectionAgent); void showDialog(); @Override void onCommitClicked(); @Override void onCancelClicked(); @Override void onValueChanged(); @Override void setAmendCommitMessage();  }
@Test public void testOnCancelClicked() throws Exception { presenter.onCancelClicked(); verify(view).close(); }