LastFrame extends Frame { @Override public void setNextFrame(Frame nextFrame) throws Exception { throw new Exception("Last Frame should not have next frame"); } LastFrame(int firstBall, int secondBall, int thirdBall); @Override int countScore(); @Override void setNextFrame(Frame nextFrame);  }
@Test(expected = Exception.class) public void shouldNotHaveNextFrame() throws Exception { LastFrame lastFrame = new LastFrame(1, 2, 3); lastFrame.setNextFrame(new Frame(1, 3)); }