title: How to write a test class to test my code?
body: <p>I want a test class to test this class but i dont know how to write it and i tried to see online but i still couldnt figure it out.I wrote the code on BlueJ, i'm trying to create the set game.</p>
  
  <pre><code>import java.util.*;
  
  public class Deck
  {
      ArrayList&lt;Card&gt; deck;
      public Deck ()
      {
           deck = new ArrayList&lt;Card&gt;();
      }
  
       public Deck (int capacity)
      {
          deck = new ArrayList&lt;Card&gt;(capacity);
      }
  
      public int getNumCards ()
      {
          return deck.size();
      }
  
      public boolean isEmpty () 
      {
          return deck.isEmpty();
      }
  
      public void add (Card card) 
      {
          deck.add(0,card);
      }
  
      public Card takeTop() 
      {
          return deck.remove(0);
      }
  
      public void shuffle ()
      {
          Collections.shuffle(deck);
      }
  
      public void sort ()
      {
          Collections.sort(deck);
      }
  
      public String toString ()
      { 
           return (deck.toString()+ "\n");
      }
  }
  </code></pre>