title: JPA Entity must be unit tested and how?
body: <p>I have a Spring MVC application (Spring Boot v. 1.2.5) that uses JPA to interact with  a popular Sql Database.<br>
  Thus, I have several entities mapping all the tables in the db. Clearly, these classes are having only getters/setters and annotations for the relations between entities.</p>
  
  <p>E.g.:</p>
  
  <pre><code>@Entity
  @Table
  public class Article {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @JsonView(View.Private.class)
      private Long id;
  
      @Column(nullable = false)
      @JsonView(View.Public.class)
      private String name;
  
      @ManyToOne(optional = false, fetch = FetchType.LAZY)
      @JoinColumn(name = "categoryId", nullable = false, updatable = false)
      @JsonIgnore
      private Category category;
  
     //Constructors Getters and Setters
     ...
  }
  </code></pre>
  
  <p>My question is: should I unit test these classes? What should I test? How</p>