I\'m using the OkHttp MockWebServer to mock my server responses for unit tests.
It works great for the first test, but on the 2nd test my client fails with:
Your second request is using the URL of the first MockWebServer instance. (Each instance has a distinct URL.)
This localhost connection fails because it does not belong tot he mock server. Use this instead (mockHelper.getHost()).willReturn(okhttpMockWebServer.url("/").toString())
(mockHelper.getHost()).willReturn(okhttpMockWebServer.url("/").toString())