mockList.add(createMockHistoricProcessInstanceUnfinished());
return mockList;
}
public static HistoricProcessInstance createMockHistoricProcessInstanceUnfinished() {
HistoricProcessInstance mock = mock(HistoricProcessInstance.class);
when(mock.getId()).thenReturn(EXAMPLE_PROCESS_INSTANCE_ID);
when(mock.getBusinessKey()).thenReturn(EXAMPLE_PROCESS_INSTANCE_BUSINESS_KEY);
when(mock.getProcessDefinitionId()).thenReturn(EXAMPLE_PROCESS_DEFINITION_ID);
when(mock.getDeleteReason()).thenReturn(EXAMPLE_HISTORIC_PROCESS_INSTANCE_DELETE_REASON);
when(mock.getEndTime()).thenReturn(null);
when(mock.getStartTime()).thenReturn(DateTimeUtil.parseDate(EXAMPLE_HISTORIC_PROCESS_INSTANCE_START_TIME));
when(mock.getDurationInMillis()).thenReturn(EXAMPLE_HISTORIC_PROCESS_INSTANCE_DURATION_MILLIS);
return mock;
}