JobDetailsPresenter implements RefreshMenuBuilder.SupportsRefresh { protected String getJobDetailTitle(RequestSummary summary) { String title = summary.getId().toString() ; if (summary.getKey() != null) { title += " - " + summary.getKey(); } return title; }  @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 getJobDetailTitleTest() { Long jobId = 1L; String key = "key"; RequestSummary job = createRequestSummary(jobId, key, RequestStatus.QUEUED); assertEquals(job.getId() + " - " + job.getKey(), presenter.getJobDetailTitle(job)); assertEquals(jobId + " - " + key, presenter.getJobDetailTitle(job)); assertEquals("1 - key", presenter.getJobDetailTitle(job)); job.setKey(null); assertEquals(job.getId().toString(), presenter.getJobDetailTitle(job)); assertEquals(jobId.toString(), presenter.getJobDetailTitle(job)); assertEquals("1", presenter.getJobDetailTitle(job)); }