I had to test some Java native concurrent code, and I had to mock some service with long running call the good solution for this purpose I found: https://medium.com/my-random-thoughts-in-software-engineering/get-rid-of-thread-sleep-e2abf3cadb6. My snippet is…