@Test
public void testGetModelValidationErrors() throws Exception {

    List<ValidationError> errors = validator.getModelValidationErrors(null, Default.class);
    assertEquals(1, errors.size());
    assertEquals("object is null", errors.get(0).getMessage());
    TestValidateModel model = TestValidateModel.builder().email("invalid").build();
    errors = validator.getModelValidationErrors(model, Default.class);
    assertEquals(1, errors.size());
    assertEquals("must be a well-formed email address", errors.get(0).getMessage());
    model = TestValidateModel.builder().email("example@example.com").build();
    errors = validator.getModelValidationErrors(model, Default.class);
    assertEquals(0, errors.size());
}