when(processEngine.getHistoryService()).thenReturn(historyServiceMock);
}
@Test
public void testGetSingleInstance() {
HistoricProcessInstance mockInstance = MockProvider.createMockHistoricProcessInstance();
HistoricProcessInstanceQuery sampleInstanceQuery = mock(HistoricProcessInstanceQuery.class);
when(historyServiceMock.createHistoricProcessInstanceQuery()).thenReturn(sampleInstanceQuery);
when(sampleInstanceQuery.processInstanceId(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID)).thenReturn(sampleInstanceQuery);
when(sampleInstanceQuery.singleResult()).thenReturn(mockInstance);