Router { public void resetTo(Screen screen) { if (tryHandleEmptyBackstack(screen)) { return; } resetTo(screen, TransitionDirection.EXIT); } Router();  Router(boolean allowEmptyStack); boolean goBack(); void goTo(Screen nextScreen); void replaceWith(Screen nextScreen); void replaceAllWith(Screen... screens); void replaceAllWith(List<Screen> screens); void resetTo(Screen screen); void resetTo(Screen nextScreen, TransitionDirection direction); boolean hasActiveScreen();  }
@Test public void emptyBackstackResetTo() { router = new TestRouter(false); Screen screenA = new ScreenA(); router.resetTo(screenA); assertTrue(router.fromPath.isEmpty()); assertEquals(screenA, router.toPath.get(0)); assertEquals(1, router.routeChangeCount); }