I have two interfaces and I am mocking one method on each one. I'm using the @capturing annotation. But simply having the @mocked parameters in a different order causes one of the interfaces to not be mocked.
(The same happens if the @mocked parameters are fields of the test class - the order matters)
The code below has two identical tests. One fails only because the parameters are in a different order. (I believe that both tests should pass)
"Does the (real) test actually need to execute the real code of some methods, while others are mocked?"
"null is the default result for any method returning a reference type, so recording "result = null" for them is redundant. Or is there something I missed?"
yeah, that's just for this test code - not null in the real code