@Test
 public void gettingAStrike() {
   g.roll(10);
   g.roll(3);
   g.roll(6);
   rollMany(17, 0);
   assertThat(g.score(), equalTo(28));
 }
  @Test
  public void gettingASpare() {
    rollASpare();
    g.roll(3);
    rollMany(17, 0);

    assertThat(g.score(), equalTo(16));
  }
 private void rollASpare() {
   g.roll(5);
   g.roll(5);
 }
 private void rollMany(int n, int pins) {
   for (int i = 0; i < n; i++) {
     g.roll(pins);
   }
 }