I need advice on an issue
Background: I have a function that constructs a url based on params and then makes a http request to said url. Now, I have added code for fallback functionality to this function such that in case the constructed url doesnt go ahead, new urls are constructed based on the fallback slice. The fallback works and now I need to test it.
Issue: There already exists code for testing the function where there are tests that use mocking to set predefined responses. Now, I need to add tests for my fallback functionality. I need to mock the output for the fallback code but I cant figure out how to use the mock. What are the different scenarios that I can test for by mocking the fallback functionality and how can I change the test vars to include mocks for the fallback?