@Test public void addWithMissingAnnotationName() { SimpleNavigatorProvider provider = new SimpleNavigatorProvider(); Navigator navigator = new NoNameNavigator(); try { provider.addNavigator(navigator); fail("Adding a provider with no @Navigator.Name should cause an " + "IllegalArgumentException"); } catch (IllegalArgumentException e) { } }
@Nullable @Override public Navigator<? extends NavDestination> addNavigator( @NonNull Navigator<? extends NavDestination> navigator) { String name = getNameForNavigator(navigator.getClass()); return addNavigator(name, navigator); }
SimpleNavigatorProvider implements NavigatorProvider { @Nullable @Override public Navigator<? extends NavDestination> addNavigator( @NonNull Navigator<? extends NavDestination> navigator) { String name = getNameForNavigator(navigator.getClass()); return addNavigator(name, navigator); } }
SimpleNavigatorProvider implements NavigatorProvider { @Nullable @Override public Navigator<? extends NavDestination> addNavigator( @NonNull Navigator<? extends NavDestination> navigator) { String name = getNameForNavigator(navigator.getClass()); return addNavigator(name, navigator); }  }
SimpleNavigatorProvider implements NavigatorProvider { @Nullable @Override public Navigator<? extends NavDestination> addNavigator( @NonNull Navigator<? extends NavDestination> navigator) { String name = getNameForNavigator(navigator.getClass()); return addNavigator(name, navigator); }  @NonNull @Override T getNavigator(
            @NonNull Class<T> navigatorClass); @SuppressWarnings("unchecked") @NonNull @Override T getNavigator(
            @NonNull String name); @Nullable @Override Navigator<? extends NavDestination> addNavigator(
            @NonNull Navigator<? extends NavDestination> navigator); @Nullable @Override Navigator<? extends NavDestination> addNavigator(@NonNull String name,
            @NonNull Navigator<? extends NavDestination> navigator); }
SimpleNavigatorProvider implements NavigatorProvider { @Nullable @Override public Navigator<? extends NavDestination> addNavigator( @NonNull Navigator<? extends NavDestination> navigator) { String name = getNameForNavigator(navigator.getClass()); return addNavigator(name, navigator); }  @NonNull @Override T getNavigator(
            @NonNull Class<T> navigatorClass); @SuppressWarnings("unchecked") @NonNull @Override T getNavigator(
            @NonNull String name); @Nullable @Override Navigator<? extends NavDestination> addNavigator(
            @NonNull Navigator<? extends NavDestination> navigator); @Nullable @Override Navigator<? extends NavDestination> addNavigator(@NonNull String name,
            @NonNull Navigator<? extends NavDestination> navigator);  }