Frame { public int countScore() { if (isStrike) { return ownScore + nextRoll() + nextNextRoll(); } if (isSpare) { return ownScore + nextRoll(); } else { return ownScore; } } Frame(int roll1, int roll2); int countScore(); void setNext(Frame nextFrame);  }
@Test public void shouldCountItsOwnScoreWhenForNonBonusCase() throws Exception { Frame frame = new Frame(1, 2); int score = frame.countScore(); assertThat(score, is(3)); }