I'm still a rather new developer,so I might not have a grasp on all the concepts and terms which could be the reason why I don't understand this. But what exactly is the difference between using andReturn(T value) vs andStubReturn(T value) for EasyMock?
Both of their parameter types are the same. In what situation would it require you do use andStubReturn() where using andReturn() couldn't achieve the same result? Because all of the tests I have written so far have been written with andReturn(), and I haven't run into any problems yet.
Isn't a stub object just a class that has implementations to all the methods defined in the interface with the expected return values put inside the method? Why would you need to do andStubReturn()?