// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/i/TestModelWithoutAnyConstraintAnnotations.java
// @MappedSuperclass
// @XmlRootElement
// public class TestModelWithoutAnyConstraintAnnotations {
// 
//   @Getter
//   @NonNull
//   @Column(name = "CREATED_AT")
//   @Temporal(TemporalType.TIMESTAMP)
//   public Date createdAt;
// 
//   @Getter
//   @NonNull
//   @Column(name = "UPDATED_AT")
//   @Temporal(TemporalType.TIMESTAMP)
//   public Date updatedAt;
// 
//   @Getter
//   @JsonIgnore
//   @Column(name = "VERSION", columnDefinition = "integer DEFAULT 0", nullable = false)
//   @Version
//   public int version;
// 
//   @PrePersist
//   void createdAt() {
//     this.createdAt = this.updatedAt = new Date();
//   }
// 
//   @PreUpdate
//   void updatedAt() {
//     this.updatedAt = new Date();
//   }
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/a/TestModelWithASingleAnnotatedMember.java
// @Getter
// public class TestModelWithASingleAnnotatedMember {
//   @NotNull
//   private String notNullString;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/b/TestModelWithCustomValidator.java
// public class TestModelWithCustomValidator {
//   @CustomValidation
//   private String customValidation;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/c/TestModelWithASingleAnnotatedMemberWithCustomMessageKey.java
// @Getter
// public class TestModelWithASingleAnnotatedMemberWithCustomMessageKey {
//   @NotNull(message = "paul")
//   private String notNullString;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/d/SubClassWithNoValidatedMembers.java
// public class SubClassWithNoValidatedMembers extends SuperClassWithValidatedMember{
//   private String notValidated;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/d/SuperClassWithValidatedMember.java
// @Getter
// public class SuperClassWithValidatedMember {
//   @NotNull()
//   private String notNullString;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/e/TestModelClassWithLotsOfIrrelevantAnnotations.java
// public class TestModelClassWithLotsOfIrrelevantAnnotations {
//   @Deprecated
//   @SafeHtml
//   @Getter
//   @JsonIgnore
//   private String foo;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/f/TestModelWithEmailAnnotation.java
// public class TestModelWithEmailAnnotation {
//   @Email
//   private String email;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/g/TestModelWithHibernateUrlAnnotation.java
// public class TestModelWithHibernateUrlAnnotation {
//   @URL
//   private String url;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/h/TestModelWithPatterns.java
// public class TestModelWithPatterns {
//   @Pattern(regexp = "abc")
//   private String addSlashPrefixSuffix;
//   @Pattern(regexp = "\\abc\\.") // \a matches the bell character ;-)
//   private String withBackslashes;
//   @Pattern(regexp = "\\\\abc\\.")
//   private String withMoreBackslashes;
// }


import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.valdr.model.i.TestModelWithoutAnyConstraintAnnotations;
import com.github.valdr.model.a.TestModelWithASingleAnnotatedMember;
import com.github.valdr.model.b.TestModelWithCustomValidator;
import com.github.valdr.model.c.TestModelWithASingleAnnotatedMemberWithCustomMessageKey;
import com.github.valdr.model.d.SubClassWithNoValidatedMembers;
import com.github.valdr.model.d.SuperClassWithValidatedMember;
import com.github.valdr.model.e.TestModelClassWithLotsOfIrrelevantAnnotations;
import com.github.valdr.model.f.TestModelWithEmailAnnotation;
import com.github.valdr.model.g.TestModelWithHibernateUrlAnnotation;
import com.github.valdr.model.h.TestModelWithPatterns;
import com.github.valdr.model.validation.CustomValidation;
import com.google.common.collect.Lists;
import org.junit.Test;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertThat;
   */
  @Test
  public void shouldProcessConfiguredCustomAnnotation() {
    // given
    parserConfiguredFor(Lists.newArrayList(TestModelWithCustomValidator.class.getPackage().getName()), Lists
      .newArrayList(CustomValidation.class.getName()));
    // when
    String json = parser.parse();
    // then
    String expected = "{" + LS +
      "  \"" + TestModelWithCustomValidator.class.getSimpleName() + "\" : {" + LS +
      "    \"customValidation\" : {" + LS +
      "      \"" + CustomValidation.class.getName() + "\" : { }" + LS +
      "    }" + LS +
      "  }" + LS +
      "}";
    assertThat(json, is(expected));
  }

  /**
   * See method name.
   */
  @Test
  public void shouldSupportEmailAnnotation() {
    // given
    parserConfiguredFor(Lists.newArrayList(TestModelWithEmailAnnotation.class.getPackage().getName()),
      emptyStringList());
    // when
    String json = parser.parse();
    // then
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/i/TestModelWithoutAnyConstraintAnnotations.java
// @MappedSuperclass
// @XmlRootElement
// public class TestModelWithoutAnyConstraintAnnotations {
// 
//   @Getter
//   @NonNull
//   @Column(name = "CREATED_AT")
//   @Temporal(TemporalType.TIMESTAMP)
//   public Date createdAt;
// 
//   @Getter
//   @NonNull
//   @Column(name = "UPDATED_AT")
//   @Temporal(TemporalType.TIMESTAMP)
//   public Date updatedAt;
// 
//   @Getter
//   @JsonIgnore
//   @Column(name = "VERSION", columnDefinition = "integer DEFAULT 0", nullable = false)
//   @Version
//   public int version;
// 
//   @PrePersist
//   void createdAt() {
//     this.createdAt = this.updatedAt = new Date();
//   }
// 
//   @PreUpdate
//   void updatedAt() {
//     this.updatedAt = new Date();
//   }
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/a/TestModelWithASingleAnnotatedMember.java
// @Getter
// public class TestModelWithASingleAnnotatedMember {
//   @NotNull
//   private String notNullString;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/b/TestModelWithCustomValidator.java
// public class TestModelWithCustomValidator {
//   @CustomValidation
//   private String customValidation;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/c/TestModelWithASingleAnnotatedMemberWithCustomMessageKey.java
// @Getter
// public class TestModelWithASingleAnnotatedMemberWithCustomMessageKey {
//   @NotNull(message = "paul")
//   private String notNullString;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/d/SubClassWithNoValidatedMembers.java
// public class SubClassWithNoValidatedMembers extends SuperClassWithValidatedMember{
//   private String notValidated;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/d/SuperClassWithValidatedMember.java
// @Getter
// public class SuperClassWithValidatedMember {
//   @NotNull()
//   private String notNullString;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/e/TestModelClassWithLotsOfIrrelevantAnnotations.java
// public class TestModelClassWithLotsOfIrrelevantAnnotations {
//   @Deprecated
//   @SafeHtml
//   @Getter
//   @JsonIgnore
//   private String foo;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/f/TestModelWithEmailAnnotation.java
// public class TestModelWithEmailAnnotation {
//   @Email
//   private String email;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/g/TestModelWithHibernateUrlAnnotation.java
// public class TestModelWithHibernateUrlAnnotation {
//   @URL
//   private String url;
// }
// 
// Path: valdr-bean-validation/src/test/java/com/github/valdr/model/h/TestModelWithPatterns.java
// public class TestModelWithPatterns {
//   @Pattern(regexp = "abc")
//   private String addSlashPrefixSuffix;
//   @Pattern(regexp = "\\abc\\.") // \a matches the bell character ;-)
//   private String withBackslashes;
//   @Pattern(regexp = "\\\\abc\\.")
//   private String withMoreBackslashes;
// }


// Path: valdr-bean-validation/src/test/java/com/github/valdr/ConstraintParserTest.java
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.github.valdr.model.i.TestModelWithoutAnyConstraintAnnotations;
import com.github.valdr.model.a.TestModelWithASingleAnnotatedMember;
import com.github.valdr.model.b.TestModelWithCustomValidator;
import com.github.valdr.model.c.TestModelWithASingleAnnotatedMemberWithCustomMessageKey;
import com.github.valdr.model.d.SubClassWithNoValidatedMembers;
import com.github.valdr.model.d.SuperClassWithValidatedMember;
import com.github.valdr.model.e.TestModelClassWithLotsOfIrrelevantAnnotations;
import com.github.valdr.model.f.TestModelWithEmailAnnotation;
import com.github.valdr.model.g.TestModelWithHibernateUrlAnnotation;
import com.github.valdr.model.h.TestModelWithPatterns;
import com.github.valdr.model.validation.CustomValidation;
import com.google.common.collect.Lists;
import org.junit.Test;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertThat;

   */
  @Test
  public void shouldProcessConfiguredCustomAnnotation() {
    // given
    parserConfiguredFor(Lists.newArrayList(TestModelWithCustomValidator.class.getPackage().getName()), Lists
      .newArrayList(CustomValidation.class.getName()));
    // when
    String json = parser.parse();
    // then
    String expected = "{" + LS +
      "  \"" + TestModelWithCustomValidator.class.getSimpleName() + "\" : {" + LS +
      "    \"customValidation\" : {" + LS +
      "      \"" + CustomValidation.class.getName() + "\" : { }" + LS +
      "    }" + LS +
      "  }" + LS +
      "}";
    assertThat(json, is(expected));
  }

  /**
   * See method name.
   */
  @Test
  public void shouldSupportEmailAnnotation() {
    // given
    parserConfiguredFor(Lists.newArrayList(TestModelWithEmailAnnotation.class.getPackage().getName()),
      emptyStringList());
    // when
    String json = parser.parse();
    // then
    assertThat(json, containsString(TestModelWithEmailAnnotation.class.getSimpleName()));