How to Simulate Delayed Backend Responses with MockRestServiceServer?

How can I simulate slow backend responses in integration tests using MockRestServiceServer? For example:

testServer = MockRestServiceServer.createServer(asyncClient);
testServer.expect(requestTo('http://dummy.api/endpoint'))
          .andExpect(method(HttpMethod.GET))
          .andRespond(withDelayedResponse(sampleData));

Is there a way to introduce timeout delays?

hey, you can simulate the delay using a scheduled executor or a timer that triggers after a set timeout. mockrestservicer uses no builtin delay support so you gotta improvise the response timing manually.