As a part of unit test I need to mock a void function(Which accept any non-primitive paramter. e.g. MAP) call with any argument.
mockObj.myMethod(<anyObject>)
Is it possible to do this with EasyMock?
Use either of the anyObject
methods: anyObject() or anyObject(T)
So
expect(mockObj.myMethod(anyObject()));
See the Flexible Expectations with Argument Matchers section of the documentation