* Verifier that extracts arguments from actual invocation. Useful when deeper validation of arguments is needed.
*/
public class ArgumentsExtractorVerifier implements VerificationMode {
- private Object[] arguments;
+ private Object[] arguments = null;
@Override
public void verify(final VerificationData data) {
Invocation invocation = actualInvocations.get(0);
arguments = invocation.getArguments();
invocation.markVerified();
-
}
@Override
}
public Object[] getArguments() {
- return arguments;
+ return arguments == null ? null : arguments.clone();
}
}