Code under test:
public class MyClass {
public static void methodA() {
methodB(x, y); //x and y are some variables
}
public static void methodB(int x, ArrayList<String> y) {
//do something
}
}
Test Case:
@Test
public void testMethodA() {
PowerMockito.stub(PowerMockito.method(MyClass.class, "methodB", Integer.class, ArrayList.class)).toReturn(null);
MyClass.methodA();
//TODO: verification
}
How can I verify that methodB was called atleast once?