Mockito matcher and array of primitives

tbruyelle picture tbruyelle · Apr 8, 2012 · Viewed 139.9k times · Source

With Mockito, I want to verify() a method call with byte[] in its argument list, but I didn't find how to write this.

 myMethod( byte[] )

I just want something like anyByteArray(), how to do that with Mockito ?

Answer

gpeche picture gpeche · Apr 8, 2012

I would try any(byte[].class)