Improve style of test mock setup