AdminAppsGridPresenterImpl implements AdminAppsGridView.Presenter,
                                                   AppInfoSelectedEvent.AppInfoSelectedEventHandler,
                                                   SaveAppSelected.SaveAppSelectedHandler { @Override public void onAppInfoSelected(final AppInfoSelectedEvent event) { adminAppService.getAppDoc(event.getApp(), new AsyncCallback<AppDoc>() { @Override public void onFailure(Throwable caught) { AutoBean<AppDoc> doc = AutoBeanCodex.decode(factory, AppDoc.class, "{}"); final AppEditor appEditor = new AppEditor(event.getApp(), doc.as()); appEditor.addSaveAppSelectedHandler(AdminAppsGridPresenterImpl.this); appEditor.show(); isDocUpdate = false; ErrorHandler.post(caught); } @Override public void onSuccess(final AppDoc result) { final AppEditor appEditor = new AppEditor(event.getApp(), result); appEditor.addSaveAppSelectedHandler(AdminAppsGridPresenterImpl.this); appEditor.show(); isDocUpdate = true; } }); } @Inject  AdminAppsGridPresenterImpl(final AdminAppsGridViewFactory viewFactory,
                               final ListStore<App> listStore); @Override HandlerRegistration addStoreRemoveHandler(StoreRemoveEvent.StoreRemoveHandler<App> handler); @Override void fireEvent(GwtEvent<?> event); @Override AdminAppsGridView getView(); @Override App getAppFromElement(Element eventTarget); @Override List<App> getSelectedApps(); @Override void onAppCategorySelectionChanged(AppCategorySelectionChangedEvent event); @Override void onAppInfoSelected(final AppInfoSelectedEvent event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); @Override void onDeleteAppsSelected(final DeleteAppsSelected event); @Override void onRestoreAppSelected(final RestoreAppSelected event); @Override void onSaveAppSelected(SaveAppSelected event); void updateBetaStatus(final App app);  }
@Test public void verifyServiceCalled_onAppInfoSelected() { verify(viewMock).addAppInfoSelectedEventHandler(Matchers.<AppInfoSelectedEvent.AppInfoSelectedEventHandler>any()); AppInfoSelectedEvent eventMock = mock(AppInfoSelectedEvent.class); App appMock = mock(App.class); when(eventMock.getApp()).thenReturn(appMock); uut.onAppInfoSelected(eventMock); verify(adminAppServiceMock).getAppDoc(eq(appMock), Matchers.<AsyncCallback<AppDoc>>any()); verifyZeroInteractions(viewMock, appServiceMock, listStoreMock); }