World extends Rainbow implements RainbowImage.LoadPictureListener { public void endEdition() { gameOfLife.endEdition(); } @VisibleForTesting protected  World(RainbowDrawer rainbowDrawer, RainbowInputController rainbowInputController); static World newInstance(); @Override void onSketchSetup(); void startEdition(); void endEdition(); void clear(); @Override void onStep(); @Override void onSketchDestroy(); void restoreLastWorld(); void loadWorldFrom(final Uri image); @Override void onLoadSucceed(RainbowImage image); @Override void onLoadFail();  }
@Test public void testThatWhenEndEditionIsCalledThenItDelegatesToGameOfLife() { world.endEdition(); verify(gameOfLifeMock).endEdition(); }