title: Junit test cases for JPA repositories
body: <p>I am new to junit, I have a repository as follows:</p>
  
  <pre><code>@Repository
  public interface ChartRepository extends JpaRepository&lt;Chart, Integer&gt;{
  }
  </code></pre>
  
  <p>and My Chart Entity class is follows:</p>
  
  <pre><code>@Entity
  @Table(name = "Chart")
  public class Chart {
  
      @Column(name = "ENT_ID")
      private String entID;
  
      @Column(name = "ent_NAME")
      private String entName;
  
      @Column(name = "ent_PRODUCER_ID")
      private String entProducerId;
  
      @Id
      @Column(name = "ent_Rc_ID")
      @SequenceGenerator(name = "ent_RC_ID_SEQ", sequenceName="ent_RC_ID_SEQ", allocationSize = 1)
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ent_RC_ID_SEQ")
      private Integer entReceiveId;
  
      @Column(name = "JOB_ID")
      private Integer jobId;
  
      @Column(name = "CREATE_DT")
      private Timestamp createdDate;
  
    //getters and Setters
  }
  </code></pre>
  
  <p>Now, Can we able to write test cases for the repository class. If so how can we do that.Can anyone please suggest me with some code samples.</p>