### Question:
Player { public void playCard(Player opponent) { Move move = strategy.nextMove(mana, health, hand); Optional<Card> card = move.getCard(); if (card.isPresent()) { playCard(card.get(), opponent, move.getAction()); } else { throw new IllegalMoveException("No card can be played from hand " + hand + " with (" + mana + ") mana."); } } Player(String name, Strategy strategy);   Player(String name, Strategy strategy, int health, int manaSlots, int mana, List<Card> deck, List<Card> hand); int getHealth(); int getMana(); int getNumberOfDeckCardsWithManaCost(int manaCost); int getNumberOfDeckCards(); Integer getNumberOfHandCardsWithManaCost(int manaCost); int getNumberOfHandCards(); void drawCard(); int getManaSlots(); void giveManaSlot(); void refillMana(); void drawStartingHand(); boolean canPlayCards(); void playCard(Player opponent); @Override String toString();  }### Answer:
@Test(expected = IllegalMoveException.class) public void playingCardWithInsufficientManaShouldFail() { player = aPlayer().withMana(3).withCardsInHand(4, 4, 4).build(); player.playCard(aCardWithValue(4), anyPlayer(), DAMAGE); }
@Test(expected = IllegalMoveException.class) public void playingCardShouldFailWhenStrategyCannotChooseCard() { given(strategy.nextMove(anyInt(), anyInt(), anyListOf(Card.class))).willReturn(noMove()); player.playCard(anyPlayer()); }