import static org.mockito.Answers.CALLS_REAL_METHODS;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
public abstract class IssouTest {
private int id;
public int getId() {
return id;
}
public int getId2() {
return getId();
}
public static void main(String[] args) {
IssouTest a = mock(CALLS_REAL_METHODS);
when(a.getId()).thenReturn(1);
// why is this false ?
System.out.println(a.getId2()== 1);
}
}
why this is not true