JobDetailsPresenter implements RefreshMenuBuilder.SupportsRefresh { public void onJobSelectedEvent(@Observes JobSelectedEvent event) { this.serverTemplateId = event.getServerTemplateId(); this.deploymentId = event.getDeploymentId(); this.jobId = event.getJobId(); refreshJobDetailsDataRemote(serverTemplateId, deploymentId, jobId); }  @WorkbenchPartView UberElement<JobDetailsPresenter> getView(); @WorkbenchPartTitle String getTitle(); @OnStartup void onStartup(final PlaceRequest place); void onJobSelectedEvent(@Observes JobSelectedEvent event); @Override void onRefresh(); void refreshJobDetailsDataRemote(final String serverTemplateId,
                                            final String deploymentId,
                                            final Long jobId); @Inject void setExecutorService(final Caller<ExecutorService> executorServices); @Inject void setChangeTitleWidgetEvent(final Event<ChangeTitleWidgetEvent> changeTitleWidgetEvent); @Inject
    public JobDetailsView view; }
@Test public void testStaleJobSelected() { final String serverTemplate = "serverTemplate"; RequestSummary job = createRequestSummary(RequestStatus.DONE); JobSelectedEvent event = new JobSelectedEvent(serverTemplate, job.getDeploymentId(), job.getJobId()); when(executorServiceMock.getRequestDetails(serverTemplate, job.getDeploymentId(), job.getJobId())).thenReturn(null); presenter.onJobSelectedEvent(event); verifyZeroInteractions(viewMock); verifyZeroInteractions(changeTitleWidgetEventMock); }