How to print all interactions with a mock using Mockito
<p>So let's say I have to write some test on <code>ClassA</code> that has a <code>ClassB</code> as member and I'm mocking <code>ClassB</code>.</p>

<p>At the end of the test i would like to use <code>verify(..)</code> and <code>verifyNoMoreInteractions(..)</code> to set the behaviour and validation for all of the mock calls.</p>

<p>Let's say that the mock has more than 10 interactions with different methods.</p>

<p>Is there any way to get JUnit to print all of the mock interactions and then use it in the code? </p>

<p>Right now I'm just reading the code and looking for the calls and than writing the verification line in the test. I'm sure there is an easier way (TDD wont be possible in my situation :)) </p>

<p>My use case: I have a class with an algorithm that uses a lot of other classes that I mock. While adding a new method that calls tons of other methods, I would like to make sure that only x amount of methods been called y amount of times as the code working now. This will make sure if someone changes something in the future, let's say by mistake calling a method 5 times instead of 4, then the test will fail.</p>