Router { public boolean hasActiveScreen() { return !backStack.isEmpty(); } 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 hasActiveScreen() { router = new TestRouter(false); Screen screenA = new ScreenA(); router.goTo(screenA); assertTrue(router.hasActiveScreen()); router.goBack(); assertFalse(router.hasActiveScreen()); }