title: How to simulate timeout in response to a Rest request in Spring?
body: <p>I have a Rest API implemented with Spring Boot 2. To check some client behavior on timeout, how can I simulate that condition in my testing environment? The server should regularly receive the request and process it (in fact, in production timeouts happen due to random network slowdowns and large big response payloads).</p>
  <p>Would adding a long sleep be the proper simulation technique? Is there any better method to really have the server &quot;drop&quot; the response?</p>