In order to successfully mock commands you have to first understand what you are getting back in a real scenario calling that command. So if your Invoke-Webrequest returns data in Json format, then you have to create that test data and return it as part of your mock. I see that you are retrieving the "content" key from the returned data. Your mock data has to have this content key value present in order for the rest of the commands to work properly.

In your code snippet, I would only mock Invoke-Webrequest and let the rest of the commands do their work from whatever test data you create.