static boolean isThereTwoPair(Hand hand) {
     
     Hand testHand = new Hand();

     for (int x = 0; x < hand.size(); x++){
     for (int y = 0; y < hand.size(); y++){
     if (y != x && hand.get(y).getValue() == hand.get(x).getValue())
         testHand.add(hand.get(y));
     }}
     
     if (testHand.size() == 4)
     return true;
     
     else return false;        
 }