I want to mock a class A with 2 parameters. Then call the real A.methodX() which during the execution calls a mocked version of A.y(). What is the best way to do so?
public class A(Object a1, Object a2) {
public void x() {Object obj = y();}
public Object y() { return result; }
}
New contributor
Math.RandomDev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2