Remove unneeded mock from test code