Wednesday, March 1, 2017

Powermock hints

In case you would like to mock some method in following way.
1) For input "A" method should return some specific answer "a"
2) For all other cases method sould return some default answer "default"


It's abit uncommon way. I assumed that declaration should be vice versa, but it's not.

P.S. If you whant to verify also inputs, please refer to this article 

No comments:

Post a Comment