### Question:
ConstraintValidatorContextDecorator implements ConstraintValidatorContext { public ConstraintValidatorContextDecorator setArguments(Object... arguments) { return setArguments(asList(arguments)); } ConstraintValidatorContextDecorator(ConstraintValidatorContext context); @SuppressWarnings("unchecked") static List<Object> getArguments(ConstraintViolation violation); @SuppressWarnings("unchecked") static Object[] getArgumentsArray(ConstraintViolation violation); ConstraintValidatorContextDecorator setArguments(Object... arguments); ConstraintValidatorContextDecorator setArguments(List<Object> arguments); @Override void disableDefaultConstraintViolation(); @Override String getDefaultConstraintMessageTemplate(); @Override ConstraintViolationBuilder buildConstraintViolationWithTemplate(String messageTemplate); @Override T unwrap(Class<T> type); static final String ARGUMENTS; }### Answer:
@Test public void setArguments_argumentsAsListWereSetToContext_success() { decorator.setArguments(LIST_ARGS); verify(context).addExpressionVariable(ARGUMENTS, LIST_ARGS); }
@Test public void setArguments_argumentsAsArrayWereSetToContext_success() { decorator.setArguments(LIST_ARGS.toArray()); verify(context).addExpressionVariable(ARGUMENTS, LIST_ARGS); }