AdminPageImpl implements AdminPage { @Override public void addScreen(final String identifier, final String title) { if (identifier == null || identifier.isEmpty()) { throw new RuntimeException("The screen identifier must be not empty."); } screenTitleByIdentifier.put(identifier, title); toolsByCategoryByScreen.put(identifier, new LinkedHashMap<>()); } AdminPageImpl(); @Inject  AdminPageImpl(final PlaceManager placeManager,
                         final Event<PreferencesCentralInitializationEvent> preferencesCentralInitializationEvent,
                         @Customizable final PreferenceScopeResolutionStrategy resolutionStrategy,
                         final UberfireBreadcrumbs breadcrumbs,
                         final TranslationService translationService); @Override void addScreen(final String identifier,
                          final String title); @Override void addTool(final String screen,
                        final String title,
                        final Set<String> iconCss,
                        final String category,
                        final Command command,
                        final ParameterizedCommand<ParameterizedCommand<Integer>> counterCommand); @Override void addTool(final String screen,
                        final String title,
                        final Set<String> iconCss,
                        final String category,
                        final Command command); @Override void addPreference(final String screen,
                              final String identifier,
                              final String title,
                              final Set<String> iconCss,
                              final String category,
                              final AdminPageOptions... options); @Override void addPreference(final String screen,
                              final String identifier,
                              final String title,
                              final Set<String> iconCss,
                              final String category,
                              final Supplier<PreferenceScopeResolutionStrategyInfo> customScopeResolutionStrategySupplier,
                              final AdminPageOptions... options); @Override void addPreference(final String screen,
                              final String identifier,
                              final String title,
                              final Set<String> iconCss,
                              final String category,
                              final PreferenceScope preferenceScope,
                              final AdminPageOptions... options); @Override void addPreference(final String screen,
                              final String identifier,
                              final String title,
                              final Set<String> iconCss,
                              final String category,
                              final Supplier<PreferenceScopeResolutionStrategyInfo> customScopeResolutionStrategySupplier,
                              final PreferenceScope preferenceScope,
                              final AdminPageOptions... options); @Override Map<String, List<AdminTool>> getToolsByCategory(final String screen); @Override String getScreenTitle(final String screen); @Override String getDefaultScreen(); @Override void setDefaultScreen(final String defaultScreen);  }
@Test(expected = RuntimeException.class) public void addScreenWithNullIdentifierTest() { adminPage.addScreen(null, "title"); }