I have a method that returns void in a class that is a dependency of the class I want to test.
This class is huge and I'm only using this single method from it.
I need to replace the implementation of this method for the test as I want it to do something different and I need to be able to access the parameters this method receives.
I cannot find a way of doing this in EasyMock. I think I know how to do it with Mockito by using doAnswer
but I don't want to add another library unless absolutely necessary.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…