SpringValidationErrors implements ValidationErrors { public void setErrors(Errors errors) { this.errors = errors; }  void setErrors(Errors errors); Errors getErrors(); @Override void addError(Object bean, Field field, ValidatorAction va);  }
@Test public void testSetErrors01() throws Exception { SpringValidationErrors validation = new SpringValidationErrors(); ReflectionTestUtils.setField(validation, "errors", null); Errors errors = new ErrorsImpl01(); validation.setErrors(errors); assertSame(errors, ReflectionTestUtils.getField(validation, "errors")); }