Move the following mock function into this function!