Suppose I am having this object objectDemo which calls to the method objectDemoMethod with 2 parameters String and null.
objectDemo
objectDemoMethod
String
null
Just use:
Mockito.verify(objectDemo, Mockito.times(1)).objectDemoMethod(Matchers.any(String.class), (ClassName) isNull());
Above help me in java 8 version. Hope this will help you.