mock Prepare to return error