Merge "ApiOptionsTest: Simplify hook restoration"