I am using EasyMocks for J2EE. I have a behavior method call that takes in 3 parameters, one of which is an object array and the other are strings.
classUnderTest.method(new anotherClass("string1","string2", objectArray));
When I try to use the aryEq method on the object array, classUnderTest.method(new anotherClass("string1","string2", aryEq(objectArray)));
I get an unexpected method error, because the behavior I have seems to be using only the array Parameter and is omitting the other two parameters. Unexpected Method : method(new anotherClass("string1","string2", objectArray) Expected method : method(objectArray)
Even if I add matchers to the other parameters, it doesnt work because only 1 matcher is expected.
Thanks