### Question:
Hand { public Hand select(int card) { Hand newHand = null; if (cards.contains(card)) { List<Integer> newCards = cardsAsIntStream().filter(c -> c != card).boxed().collect(toList()); newHand = new Hand(newCards); } else { throw new IllegalArgumentException("illegal card : " + card); } return newHand; } Hand();  Hand(List<Integer> cards); String toString(); IntStream cardsAsIntStream(); Hand select(int card);  }### Answer:
@Test(expected=IllegalArgumentException.class) public void testSelect_Illegal() { List<Integer> cards = IntStream.range(1,10+1).boxed().collect(toList()); Hand hand = new Hand(cards); Hand result = hand.select(18); }