### Question:
Game { public Player getWinner() { if (activePlayer.getHealth() < 1) { return opponentPlayer; } else if (opponentPlayer.getHealth() < 1) { return activePlayer; } else { return null; } } Game(Player player1, Player player2);   Game(Player player1, Player player2, StartingPlayerChooser startingPlayerChooser); void beginTurn(); void endTurn(); Player getWinner(); void run(); Player getActivePlayer(); Player getOpponentPlayer(); static void main(String... args);  }### Answer:
@Test public void opponentLoosesWhenHealthIsZero() { Player player1 = aPlayer().withMana(10).withCardsInHand(4, 6).build(); Player player2 = aPlayer().withHealth(10).build(); game = aGame().withActivePlayer(player1).withOpponentPlayer(player2).build(); player1.playCard(aCardWithValue(6), player2, DAMAGE); player1.playCard(aCardWithValue(4), player2, DAMAGE); assertThat(game.getWinner(), is(player1)); }
@Test public void ongoingGameHasNoWinner() { Player player1 = aPlayer().withMana(10).withCardsInHand(4, 6).build(); Player player2 = aPlayer().withHealth(30).build(); game = aGame().withActivePlayer(player1).withOpponentPlayer(player2).build(); player1.playCard(aCardWithValue(4), player2, DAMAGE); assertThat(game.getWinner(), is(nullValue())); }