### Question:
RockPaper { public final int play(final String playerOne, final String playerTwo) { int response = DRAW; if (isDraw(playerOne, playerTwo)) { response = DRAW; } else if (PAPER.equals(playerOne)) { return checkPaperRulesPlayerOne(playerTwo); } else if (ROCK.equals(playerOne) && PAPER.equals(playerTwo)) { response = WINPLAYERTWO; } else if (SCISSORS.equals(playerOne) && PAPER.equals(playerTwo)) { response = WINPLAYERONE; } else if (ROCK.equals(playerOne) && LIZZARD.equals(playerTwo)) { response = WINPLAYERONE; } else if (LIZZARD.equals(playerOne) && ROCK.equals(playerTwo)) { response = WINPLAYERTWO; } else if (SPOCK.equals(playerOne) && PAPER.equals(playerTwo)) { response = WINPLAYERTWO; } return response; }  final int play(final String playerOne, final String playerTwo); static final int DRAW; static final int WINPLAYERONE; static final int WINPLAYERTWO; static final String SPOCK; static final String LIZZARD; static final String ROCK; static final String PAPER; static final String SCISSORS; }### Answer:
@Test public final void sameMovesReturnDraw() { Assert.assertEquals(RockPaper.DRAW, this.GAME.play(RockPaper.SCISSORS, RockPaper.SCISSORS)); Assert.assertEquals(RockPaper.DRAW, this.GAME.play(RockPaper.PAPER, RockPaper.PAPER)); Assert.assertEquals(RockPaper.DRAW, this.GAME.play(RockPaper.ROCK, RockPaper.ROCK)); Assert.assertEquals(RockPaper.DRAW, this.GAME.play(RockPaper.LIZZARD, RockPaper.LIZZARD)); Assert.assertEquals(RockPaper.DRAW, this.GAME.play(RockPaper.SPOCK, RockPaper.SPOCK)); }
@Test public final void scissorsCutPaper() { Assert.assertEquals(RockPaper.WINPLAYERONE, this.GAME.play(RockPaper.SCISSORS, RockPaper.PAPER)); Assert.assertEquals(RockPaper.WINPLAYERTWO, this.GAME.play(RockPaper.PAPER, RockPaper.SCISSORS)); }
@Test public final void paperCoversRock() { Assert.assertEquals(RockPaper.WINPLAYERONE, this.GAME.play(RockPaper.PAPER, RockPaper.ROCK)); Assert.assertEquals(RockPaper.WINPLAYERTWO, this.GAME.play(RockPaper.ROCK, RockPaper.PAPER)); }
@Test public final void rockCrushersLizard() { Assert.assertEquals(RockPaper.WINPLAYERONE, this.GAME.play(RockPaper.ROCK, RockPaper.LIZZARD)); Assert.assertEquals(RockPaper.WINPLAYERTWO, this.GAME.play(RockPaper.LIZZARD, RockPaper.ROCK)); }
@Test public final void paperDisprovesSpock() { Assert.assertEquals(RockPaper.WINPLAYERONE, this.GAME.play(RockPaper.PAPER, RockPaper.SPOCK)); Assert.assertEquals(RockPaper.WINPLAYERTWO, this.GAME.play(RockPaper.SPOCK, RockPaper.PAPER)); }