@Override
protected void testGarageTask(Emergency emergency, List<Vehicle> selectedVehicles) throws Exception {
List<TTaskAbstract> taskAbstracts = humanTaskServiceClient.getMyTaskAbstracts("", "garage_emergency_service", "", null, "", "", "", 0, 0);
Assert.assertNotNull(taskAbstracts);
Assert.assertEquals(1, taskAbstracts.size());
TTaskAbstract taskAbstract = taskAbstracts.get(0); // getting the first task
Assert.assertEquals(" Select Vehicle For " + emergency.getId() + " ", taskAbstract.getName().getLocalPart());
//Garage team starts working on the task
humanTaskServiceClient.setAuthorizedEntityId("garage_emergency_service");
humanTaskServiceClient.start(taskAbstract.getId());
//A Firetruck is selected
Map<String, Object> info = new HashMap<String, Object>();
info.put("emergency.vehicles", selectedVehicles);
//Garage team completes the task
humanTaskServiceClient.complete(taskAbstract.getId(), info);
Thread.sleep(2000);
}