Mocking for integration tests
问题 How does one mock the many dependencies needed for integration tests? I use Mockito for my 'pure' unit tests. 'Pure' in this case means testing a single class, mocking all of it's dependencies. Beautiful. Now come integration tests. Let's say in this case an integration test will test something like this: Message is put on a queue Message is 'processed' Response message is put on a response queue Let's also say that the processing that happens in step 2 is serious stuff. It relies on lots of