In the following example, test_stub will not be called. But test_stub will be call when fun1 and fun2 are in two diff files.
main.c:
int test_stub(int a){
return 0;
}
stub.set(fun1, test_stub);
fun2(1);
test.c:
fun1(int a){return a;}
fun2(int a){ return fun1(a);}