I have a class A with a publish() method. In the method will call another method and pass the class A object as a parameter to Class B.
public class A {
public void publish() {
ClassB classb = new ClassB();
classb.sendRequest(this)
}
}
The question is how to use Mockito to verify the sendRequest method is called when the publish() method is called? I am new to Mockito.