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);
Response response = given().pathParam("id", MockProvider.EXAMPLE_PROCESS_INSTANCE_ID)
.then().expect().statusCode(Status.OK.getStatusCode())
.when().get(HISTORIC_SINGLE_PROCESS_INSTANCE_URL);