@@ -0,0 +1,1902 @@
+package apostov;%0D%0A%0D%0Aimport static apostov.Suit.CLUBS;%0D%0Aimport static apostov.Suit.DIAMONDS;%0D%0Aimport static apostov.Suit.HEARTS;%0D%0Aimport static apostov.Suit.SPADES;%0D%0Aimport static apostov.Value.FIVE;%0D%0Aimport static apostov.Value.FOUR;%0D%0Aimport static apostov.Value.KING;%0D%0Aimport static apostov.Value.QUEEN;%0D%0Aimport static apostov.Value.SEVEN;%0D%0Aimport static apostov.Value.SIX;%0D%0Aimport static com.google.common.collect.ImmutableSet.copyOf;%0D%0Aimport static com.google.common.collect.Iterables.concat;%0D%0Aimport static org.junit.Assert.*;%0D%0Aimport static strength.PokerHandKind.PAIR;%0D%0A%0D%0Aimport org.junit.Test;%0D%0A%0D%0Aimport com.google.common.collect.ImmutableCollection;%0D%0Aimport com.google.common.collect.ImmutableSet;%0D%0A%0D%0Aimport strength.PairRanking;%0D%0Aimport strength.PokerHandRanking;%0D%0A%0D%0Apublic class ShowdownEvaluatorTest %7B%0D%0A%0D%0A%09@Test%0D%0A%09public void selectBestCombinationWithTwoKings() %7B%0D%0A%09%09final Card seven = new Card(SEVEN, SPADES);%0D%0A%09%09final ImmutableCollection%3CCard%3E holeCards = ImmutableSet.of(%0D%0A%09%09%09%09seven,%0D%0A%09%09%09%09new Card(KING, CLUBS));%0D%0A%09%09%0D%0A%0D%0A%09%09final Card queen = new Card(QUEEN, CLUBS);%0D%0A%09%09final Card six = new Card(SIX, DIAMONDS);%0D%0A%09%09final ImmutableCollection%3CCard%3E board = ImmutableSet.of(%0D%0A%09%09%09%09new Card(FIVE, CLUBS),%0D%0A%09%09%09%09new Card(KING, DIAMONDS),%0D%0A%09%09%09%09new Card(FOUR, HEARTS),%0D%0A%09%09%09%09queen,%0D%0A%09%09%09%09six);%0D%0A%09%09%0D%0A%09%09final ShowdownEvaluator evaluator = new ShowdownEvaluator();%0D%0A%09%09final PokerHandRanking handStrength = evaluator.selectBestCombination(copyOf(concat(holeCards, board)));%0D%0A%09%09assertSame(PAIR, handStrength.handKind);%0D%0A%09%09final PairRanking pairRanking = (PairRanking) handStrength;%0D%0A%09%09assertSame(KING, pairRanking.pairValue);%0D%0A%09%09assertEquals(%0D%0A%09%09%09%09ImmutableSet.of(CLUBS, DIAMONDS),%0D%0A%09%09%09%09ImmutableSet.of(pairRanking.firstSuit, pairRanking.secondSuit));%0D%0A%09%09assertEquals(queen, pairRanking.firstKicker);%0D%0A%09%09assertEquals(seven, pairRanking.secondKicker);%0D%0A%09%09assertEquals(six, pairRanking.thirdKicker);%0D%0A%09%7D%0D%0A%7D%0D%0A

Add a JUnit test for the selectBestCombination() method