Testing network I/O code without accessing the backend is not easy. Here is how you can mock the backend by injecting code into the URL Loading System
—