AddRemoteRepositoryPresenter implements AddRemoteRepositoryView.ActionDelegate { public void showDialog(@NotNull AsyncCallback<Void> callback) { this.callback = callback; view.setUrl(""); view.setName(""); view.setEnableOkButton(false); view.showDialog(); } @Inject  AddRemoteRepositoryPresenter(AddRemoteRepositoryView view, GitServiceClient service, AppContext appContext); void showDialog(@NotNull AsyncCallback<Void> callback); @Override void onOkClicked(); @Override void onCancelClicked(); @Override void onValueChanged();  }
@Test public void testShowDialog() throws Exception { presenter.showDialog(callback); verify(view).setUrl(eq(EMPTY_TEXT)); verify(view).setName(eq(EMPTY_TEXT)); verify(view).setEnableOkButton(eq(DISABLE_BUTTON)); verify(view).showDialog(); }