My SUT may call a method on my mock with any object as paramter, including null.
So, does EasyMock.anyObject() match a null parameter? or can I use something else instead of anyObject() which will also match null ?
Since EasyMock also offers matchers for notNull() and null(), I assume the answer is yes - otherwise anyObject() and notNull() would be redundant (if anyObject() did not match null).
A simple test confirms this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With