In the testing method, there are methods of the same class. How to mock the methods of the same class?
An example is as follows.
I am testing method2. It involves method1 which is in the same class. How to mock this method1?
public class A
{
public void method1(int a, int b){
}
public void method2(){
int value = method1(10,20);
}
}