I want to verify that the following method is called
MessageSourceAccessor.getMessage(String code, Object[] args, Locale locale)
with 10th member of args array equal to "CHF" and I don't want to check other members of this array.
So far I tried the following construction:
Object [] obj = new Object[] {anyObject(),
anyObject(), anyObject(), anyObject(), anyObject(), anyObject(), anyObject(), anyObject(), anyObject(), "CHF", anyObject(), anyObject()};
verify(msa, times(1))
.getMessage(eq("invoice.emailBody.1"), aryEq(obj), any(Locale.class));
Unfortunately mockito complains that I cannot use anyObject() in this case. On the other hand if I don't use it I must provide values for all of the array members which is not what I want.
Perhaps someone faced this issue before? If so, I would appreciate any help
Thanks