Mockito : how to verify method was called on an object created within a method?
I am new to Mockito. Given the class below, how can I use Mockito to verify that someMethod was invoked exactly once after foo was invoked? public class Foo { public void foo(){ Bar bar = new Bar(); bar.someMethod(); } } I would like to make the following verification call, verify(bar, times(1)).someMethod(); where bar is … Read more