How to verify that a specific method was not called using Mockito?
How to verify that a method is not called on an object’s dependency? For example: public interface Dependency { void someMethod(); } public class Foo { public bar(final Dependency d) { … } } With the Foo test: public class FooTest { @Test public void dependencyIsNotCalled() { final Foo foo = new Foo(…); final Dependency … Read more