Router implements Serializable { public RouteRegistry getRegistry() { if (VaadinSession.getCurrent() != null) { return SessionRouteRegistry .getSessionRegistry(VaadinSession.getCurrent()); } return registry; } Router(RouteRegistry registry); void initializeUI(UI ui, VaadinRequest initRequest); void initializeUI(UI ui, Location location); Optional<NavigationState> resolveNavigationTarget(String pathInfo,
            Map<String, String[]> parameterMap); Optional<NavigationState> resolveNavigationTarget(
            Location location); Optional<NavigationState> resolveRouteNotFoundNavigationTarget(); int navigate(UI ui, Location location, NavigationTrigger trigger); int navigate(UI ui, Location location, NavigationTrigger trigger,
            JsonValue state); RouteRegistry getRegistry(); Optional<ErrorTargetEntry> getErrorNavigationTarget(
            Exception exception);  }
@Test public void alias_has_two_parents_even_if_route_doesnt() { RouteConfiguration.forRegistry(router.getRegistry()) .setAnnotatedRoute(AliasLayout.class); List<Class<? extends RouterLayout>> parents = router.getRegistry() .getRouteLayouts("noParent", AliasLayout.class); Assert.assertTrue("Main route should have no parents.", parents.isEmpty()); parents = router.getRegistry().getRouteLayouts("twoParents", AliasLayout.class); Assert.assertEquals("Route alias should have two parents", 2, parents.size()); }