/** * Typical failed validation - {@link ValidationException} is thrown */ @Test(expected = BindException.class) public void testValidateFailureWithErrors() throws Exception { try { validator.validate(MockSpringValidator.REJECT_VALUE); } catch (ValidationException e) { throw (BindException) e.getCause(); } }