// assert query invocation
InOrder inOrder = Mockito.inOrder(mockedQuery);
inOrder.verify(mockedQuery).processDefinitionKey(queryKey);
inOrder.verify(mockedQuery).list();
String content = response.asString();
List<String> instances = from(content).getList("");
Assert.assertEquals("There should be one process definition returned.", 1, instances.size());
Assert.assertNotNull("There should be one process definition returned", instances.get(0));
String returnedInstanceId = from(content).getString("[0].id");