final String argValue = new String("arg-value");
final Map argsMap = new HashMap(1);
argsMap.put(argName, argValue);
final BooleanWrapper calledSetArgs = new BooleanWrapper(false);
InvokeElement invoke = new InvokeElement() {
void setArguments(Map arguments) {
calledSetArgs.setValue(true);
String value = (String) arguments.get(argName);
assertEquals("Unexpected argument value.", argValue, value);
}