@Test
    public void testPerformSimulationWith2Threads() throws InterruptedException {
        AbstractStartingHand winner = new TexasHoldemStartingHand(new Card(Suit.CLUB, Rank.ACE), new Card(Suit.SPADE, Rank.ACE));
        AbstractStartingHand loser = new TexasHoldemStartingHand(new Card(Suit.SPADE, Rank.DEUCE), new Card(Suit.HEART, Rank.SEVEN));
        
        int digits = 3;
        
        List<AbstractStartingHand> startingHands = new ArrayList<AbstractStartingHand>();
        startingHands.add(winner);
        startingHands.add(loser);
        
        // Making sure the hand winner always wins
        List<Card> boardCards = new ArrayList<Card>();
        boardCards.add(new Card(Suit.HEART, Rank.ACE));
        boardCards.add(new Card(Suit.DIAMOND, Rank.ACE));
        boardCards.add(new Card(Suit.DIAMOND, Rank.JACK));
        
        AbstractPokerHandSimulator simulator = new PokerHandSimulatorVersion2(startingHands, boardCards, 10000);
        SimulationResult result = simulator.performSimulation(2);
        
        // Checking that the hand winner always won
        assertEquals(1, result.getEquityForHand(winner, digits), 0);
        assertEquals(0, result.getEquityForHand(loser, digits), 0);        
        
        assertEquals(100, result.getWinPercentageForHand(winner, digits), 0);
        assertEquals(0, result.getTiePercentageForHand(winner, digits), 0);
        assertEquals(0, result.getLossPercentageForHand(winner, digits), 0);
        
        assertEquals(0, result.getWinPercentageForHand(loser, digits), 0);
        assertEquals(0, result.getTiePercentageForHand(loser, digits), 0);
        assertEquals(100, result.getLossPercentageForHand(loser, digits), 0);        
    }