We like to share
Mocking Network Requests in Drupal 8 Kernel Tests
Handling how your application or module handles network requests is one of the most valuable uses of Unit/Kernel testing. But you don't want tests running against an external service. I'll show you how to create mock requests in a straight and simple way.