ProcessInstanceLogPresenter extends AbstractMultiGridPresenter<ProcessInstanceLogSummary, ProcessInstanceLogPresenter.ProcessInstanceLogView> implements ProcessInstanceSummaryAware { public void loadTaskDetails(Long workItemId, final Date logDate, ProcessInstanceLogItemDetailsView workItemView) { taskService.call( (TaskSummary task) -> { workItemView.setTaskDetailsData(task, logDate); }).getTaskByWorkItemId(processInstance.getServerTemplateId(), processInstance.getDeploymentId(), workItemId); }  int getPageSize(); void setCurrentPage(int i); int getCurrentPage(); @Inject void setDataSetQueryHelper(final DataSetQueryHelper dataSetQueryHelper); @Inject void setProcessInstanceLogBasicFiltersPresenter(final ProcessInstanceLogBasicFiltersPresenter pILBasicFiltersPresenter); @Inject void setFilterSettingsManager(final ProcessInstanceLogFilterSettingsManager filterSettingsManager); @PostConstruct void init(); IsWidget getWidget(); HTMLElement getBasicFiltersView(); DataSetQueryHelper getDataSetQueryHelper(); void loadProcessInstanceLogs(); void loadMoreProcessInstanceLogs(); void loadTaskDetails(Long workItemId,
                                final Date logDate,
                                ProcessInstanceLogItemDetailsView workItemView); void loadWorkItemDetails(Long workItemId,
                                    ProcessInstanceLogItemDetailsView workItemView); @Override void setProcessInstance(ProcessInstanceSummary processInstance); void refreshGrid(); @Override boolean existActiveSearchFilters(); void setupActiveSearchFilters(); @Override void createListBreadcrumb(); @Inject void setTaskService(Caller<TaskService> taskService); @Inject void setProcessRuntimeDataService(Caller<ProcessRuntimeDataService> processRuntimeDataService); static final int PAGE_SIZE; }
@Test public void testLoadTaskDetails() { Long workItemId = 1L; String containerId = "deploymentId"; String serverTemplateId = "server-template-id"; TaskSummary task = TaskSummary.builder().id(workItemId).actualOwner("owner").createdOn(new Date()).description("description").build(); ProcessInstanceLogItemDetailsView humanTaskView = mock(ProcessInstanceLogItemDetailsView.class); when(taskServiceMock.getTaskByWorkItemId(serverTemplateId, containerId, workItemId)).thenReturn(task); presenter.setProcessInstance(ProcessInstanceSummary.builder().withServerTemplateId(serverTemplateId).withDeploymentId(containerId).withProcessInstanceId(1l).build()); presenter.loadTaskDetails(workItemId, logDate, humanTaskView); verify(taskServiceMock).getTaskByWorkItemId(serverTemplateId, containerId, workItemId); verify(humanTaskView).setTaskDetailsData(task, logDate); }