i am facing a problem regarding class mocking in java.
I will explain the problem using dummy classes( to avoid project related security concerns) We have a class Employee
public class Employee {
public int netSalary() {
int sal = totalSal() - 100;
return sal;
}
public int totalSal() {
// code to return value which is making db calls or remote calls
}
}
Now my problem is that how to test netSalary method without totalSal method being called i have tried expect().andReturn() as well as suppress(method());
But both are not working