My script is below
class SuperClass{
public void run(){
System.out.println("I am running in Super class");
}
}
class ChildClass extends SuperClass{
public void childRunner(){
System.out.println("Step 1");
System.out.println("Step 2");
**run();**
System.out.println("Last Step");
}
}
Now I want to mock the childRunner()method ChildClass, and since this method internally calls the superclass method, I need help / part of the code on how to mock the method run()that is present in the childRunner()method ChildClass.
source
share