I need to write unit test in junit for a method, the method is inside class A and class A extends Class B. My testing method methodA() calls another methodB() which is inside class B. So how should I mock this methodB() call so that when I call methodA() from my testCase, it get passed?
Which class should I mock, classA or Class B?
What I have tried:
ClassA obj=new ClassA();