I have a situation like this
class A{
public method1(){
result = method2();
}
private method2(){
result = method3()
some processing;
return result2;
}
private method3(){
processing;
return result;
}
}
I want to test method1(), but when method2 calls method3, I don't want actual method3 to execute, but return value I want. Is there a way to do this?