I'm new to Mockito and unit testing in general, so here's a basic question. Given this class:
public class A{
private B b;
public A(){
b = new B();
}
private void test(){
b.some_other_method();
}
}
Won't this successfully stub down the chain?
a = Mockito.mock(A.class);
b = Mockito.mock(B.class);
Mockito.when(b.some_other_method()).thenReturn("testing");
a.test();
Thanks!