Safety framework for testing of driverless vehicles