I need to globally mock class method.
I mean, i can't create mocked object and stub methods. My api doesn't take this object as an argument so i cant pass it inside function calls, but object of this class are created inside those functions and used there. That's why I need to mock it globally.
class A {
public void methodA() {}
}
I need to mock methodA().
I can imagine it might be nearly impossible to achive by mockito. Does anyone have idea how to achive this ? Or should i rewrite my code ?