I have requirement to mock some of the service calls, but i need to send response after waiting a period of time.
I know i can do this by using Thread.sleep(n)
, but i'm not comfortable to make complete thread to sleep for certain time.
So i'm look if RestTemplate has any method like setResponseTime()
to set Response delay time. or can i achieve this by using any another external dependency ?