@Test
    public void testPairVsPairTieWithGivenHandType() {
        FiveCardPokerHand pair1 = new FiveCardPokerHand();
        assertTrue(pair1.addCard(new Card(Suit.SPADE, Rank.ACE)));
        assertTrue(pair1.addCard(new Card(Suit.HEART, Rank.QUEEN)));
        assertTrue(pair1.addCard(new Card(Suit.DIAMOND, Rank.QUEEN)));
        assertTrue(pair1.addCard(new Card(Suit.DIAMOND, Rank.SEVEN)));
        assertTrue(pair1.addCard(new Card(Suit.SPADE, Rank.NINE)));

        FiveCardPokerHand pair2 = new FiveCardPokerHand();
        assertTrue(pair2.addCard(new Card(Suit.CLUB, Rank.ACE)));
        assertTrue(pair2.addCard(new Card(Suit.SPADE, Rank.QUEEN)));
        assertTrue(pair2.addCard(new Card(Suit.CLUB, Rank.QUEEN)));
        assertTrue(pair2.addCard(new Card(Suit.DIAMOND, Rank.NINE)));
        assertTrue(pair2.addCard(new Card(Suit.CLUB, Rank.SEVEN)));

        SameHandTypeComparator newComparator = new SameHandTypeComparator(PokerHandType.PAIR);
        
        assertTrue(newComparator.compare(pair1, pair2) == 0);
    }