FetchPresenter implements FetchView.ActionDelegate { @Override public void onCancelClicked() { view.close(); } @Inject  FetchPresenter(DtoFactory dtoFactory,
                          FetchView view,
                          GitOutputPartPresenter console,
                          GitServiceClient service,
                          AppContext appContext,
                          GitLocalizationConstant constant,
                          NotificationManager notificationManager,
                          DtoUnmarshallerFactory dtoUnmarshallerFactory,
                          BranchSearcher branchSearcher); void showDialog(); @Override void onFetchClicked(); @Override void onCancelClicked(); @Override void onValueChanged(); @Override void onRemoteBranchChanged(); @Override void onRemoteRepositoryChanged();  }
@Test public void testOnCancelClicked() throws Exception { presenter.onCancelClicked(); verify(view).close(); }