I would try any(byte[].class)
Try this:
AdditionalMatchers.aryEq(array);
I would rather use Matchers.<byte[]>any()
. This worked for me.
I agree with Mutanos and Alecio. Further, one can check as many identical method calls as possible (verifying the subsequent calls in the production code, the order of the verify's does not matter). Here is the code:
import static org.mockito.AdditionalMatchers.*;
verify(mockObject).myMethod(aryEq(new byte[] { 0 }));
verify(mockObject).myMethod(aryEq(new byte[] { 1, 2 }));
I used Matchers.refEq
for 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