.when().get(EXECUTION_URL);
}
@Test
public void testGetNonExistingExecution() {
ExecutionQuery sampleExecutionQuery = mock(ExecutionQuery.class);
when(runtimeServiceMock.createExecutionQuery()).thenReturn(sampleExecutionQuery);
when(sampleExecutionQuery.executionId(anyString())).thenReturn(sampleExecutionQuery);
when(sampleExecutionQuery.singleResult()).thenReturn(null);
String nonExistingExecutionId = "aNonExistingInstanceId";
given().pathParam("id", nonExistingExecutionId)
.then().expect().statusCode(Status.NOT_FOUND.getStatusCode()).contentType(ContentType.JSON)