WorldEditor { public void cancel() { world.restoreLastWorld(); endEdition(); } @VisibleForTesting protected  WorldEditor(World world); static WorldEditor newInstance(); void startEdition(); void clear(); void cancel(); void endEdition(); void loadWorldFrom(Uri image);  }
@Test public void testThatCancelRestoresLastWorld() { worldEditor.cancel(); verify(world).restoreLastWorld(); }