I'm writing unit tests now. I need to simulate long-run method with Mockito to test my implementation's timeout handling. Is it possible with Mockito?
Something like this:
when(mockedService.doSomething(a, b)).thenReturn(c).after(5000L);
See Question&Answers more detail:os