ValidationUtil { public static Errors validate(Validator validator, Object value) { String objectName = null; Errors errors = null; if (value != null) { objectName = value.getClass().getSimpleName(); if (objectName != null) { objectName = Introspector.decapitalize(objectName); } } errors = new BindException(value, objectName); if (validator != null) { validator.validate(value, errors); } return errors; } protected  ValidationUtil(); static Errors validate(Validator validator, Object value); static List<FieldError> getFieldErrorList(Errors errors); static List<ObjectError> getObjectErrorList(Errors errors); static List<DefaultMessageSourceResolvable> getDefaultMessageSourceResolvableList(
            Errors errors);  }
@Test public void testValidate001() { Validator validator = new ValidatorStub(); Object value = new HogeBean(); Errors result = ValidationUtil.validate(validator, value); assertNotNull(result); assertEquals(0, result.getErrorCount()); }