@Test
public void testGetSingleInstance() {
ProcessInstance mockInstance = MockProvider.createMockInstance();
ProcessInstanceQuery sampleInstanceQuery = mock(ProcessInstanceQuery.class);
when(runtimeServiceMock.createProcessInstanceQuery()).thenReturn(sampleInstanceQuery);
when(sampleInstanceQuery.processInstanceId(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID)).thenReturn(sampleInstanceQuery);
when(sampleInstanceQuery.singleResult()).thenReturn(mockInstance);
given().pathParam("id", MockProvider.EXAMPLE_PROCESS_INSTANCE_ID)
.then().expect().statusCode(Status.OK.getStatusCode())
.body("id", equalTo(MockProvider.EXAMPLE_PROCESS_INSTANCE_ID))