PushToRemotePresenter implements PushToRemoteView.ActionDelegate { @Override public void onCancelClicked() { view.close(); } @Inject  PushToRemotePresenter(DtoFactory dtoFactory,
                                 PushToRemoteView view,
                                 GitServiceClient service,
                                 GitOutputPartPresenter console,
                                 AppContext appContext,
                                 GitLocalizationConstant constant,
                                 NotificationManager notificationManager,
                                 DtoUnmarshallerFactory dtoUnmarshallerFactory,
                                 BranchSearcher branchSearcher); void showDialog(); @Override void onPushClicked(); @Override void onCancelClicked(); @Override void onLocalBranchChanged(); @Override void onRepositoryChanged();  }
@Test public void testOnCancelClicked() throws Exception { presenter.onCancelClicked(); verify(view).close(); }