Replaces f with mockRetsly.