RouterLink extends Component implements HasText, HasComponents,
        HasStyle, AfterNavigationObserver, Focusable<RouterLink> { private Router getRouter() { Router router = null; if (getElement().getNode().isAttached()) { StateTree tree = (StateTree) getElement().getNode().getOwner(); router = tree.getUI().getInternals().getRouter(); } if (router == null) { router = VaadinService.getCurrent().getRouter(); } if (router == null) { throw new IllegalStateException( "Implicit router instance is not available. " + "Use overloaded method with explicit router parameter."); } return router; } RouterLink();  RouterLink(String text,
            Class<? extends Component> navigationTarget); <T, C extends Component & HasUrlParameter<T>> RouterLink(String text,
            Class<? extends C> navigationTarget, T parameter);  RouterLink(String text, Class<? extends Component> navigationTarget,
            RouteParameters parameters);  RouterLink(Router router, String text,
            Class<? extends Component> navigationTarget); <T, C extends Component & HasUrlParameter<T>> RouterLink(
            Router router, String text, Class<? extends C> navigationTarget,
            T parameter);  RouterLink(Router router, String text,
            Class<? extends Component> navigationTarget,
            RouteParameters parameters); void setRoute(Router router,
            Class<? extends Component> navigationTarget); void setRoute(
            Router router, Class<? extends C> navigationTarget, T parameter); void setRoute(Router router,
            Class<? extends Component> navigationTarget,
            RouteParameters parameters); void setRoute(Class<? extends Component> navigationTarget); void setRoute(
            Class<? extends C> navigationTarget, T parameter); void setRoute(Class<? extends Component> navigationTarget,
            RouteParameters parameters); String getHref(); Optional<QueryParameters> getQueryParameters(); void setQueryParameters(QueryParameters queryParameters); HighlightCondition<RouterLink> getHighlightCondition(); void setHighlightCondition(
            HighlightCondition<RouterLink> highlightCondition); HighlightAction<RouterLink> getHighlightAction(); void setHighlightAction(
            HighlightAction<RouterLink> highlightAction); @Override void afterNavigation(AfterNavigationEvent event);  }
@Test(expected = IllegalStateException.class) public void noImplicitRouter() { VaadinService service = VaadinService.getCurrent(); Mockito.when(service.getRouter()).thenReturn(null); new RouterLink("Show something", TestView.class); }