title: Wiremock does not respond
body: <p>I have an integration test for rest api microservers that stubs some of the external resources. Most of them work, but there is a particular one which becomes not available during the test.</p>
  <ul>
  <li>Other tests stubbed the same way work</li>
  <li>Given stubbing works when request is sent directly from the test or if called from postman while test is in Thread.sleep()</li>
  <li>Stubbing does not work when the same request as used above is sent from one of the microservices called by the test or from postman if a microservice is paused (paused on a debug breakpoint). Other stubs work in these conditions.</li>
  </ul>
  <blockquote>
  <pre><code>@ClassRule
  public static WireMockRule wireMockRule = new WireMockRule(
          wireMockConfig()
              .port(8080)
              .usingFilesUnderDirectory(&quot;src/integration-test/resources&quot;));
  </code></pre>
  </blockquote>
  <pre><code>       public static void stubExtService(WireMockRule wireMockRule) {
                  wireMockRule.stubFor(post(urlPathEqualTo(&quot;/my/url&quot;))
                      .willReturn(aResponse().withHeader(&quot;Content-Type&quot;, &quot;application/json&quot;)
                          .withStatus(200)
                          .withBodyFile(&quot;json/response.json&quot;)));
          }
  </code></pre>