@Test(expected = BeanValidationException.class)
public void emailAnnotationShouldWork() {

     LocalDate yesterday = LocalDate.now().minusDays(1);
     
     String json = String.format("{\"name\":\"Getu\", \"age\": 20, \"socialMedia\": 3, \"birth\": \"%s\", \"email\": \"heimdall_at_heimdall.com\"}", yesterday.toString());
     
     try {
          subject.parse(json , PersonJsonTest.class);
     } catch (BeanValidationException e) {
          List<BeanValidationErrorDTO> errors = subject.parse(e.getViolations(), new TypeReference<List<BeanValidationErrorDTO>>() {});
          assertThat(errors, contains(hasProperty("attribute", is("email"))));
          throw e;
     }
}