UserUtil implements UserConstants { @NotNull public static String getAdminId(@NotNull ConfigurationParameters parameters) { return parameters.getConfigValue(PARAM_ADMIN_ID, DEFAULT_ADMIN_ID); } private  UserUtil(); static boolean isAdmin(@NotNull ConfigurationParameters parameters, @NotNull String userId); @NotNull static String getAdminId(@NotNull ConfigurationParameters parameters); @NotNull static String getAnonymousId(@NotNull ConfigurationParameters parameters); static boolean isType(@Nullable Tree authorizableTree, @NotNull AuthorizableType type); @Nullable static AuthorizableType getType(@NotNull Tree authorizableNode); @Nullable static AuthorizableType getType(@Nullable String primaryTypeName); static boolean isSystemUser(@Nullable Tree authorizableTree); @Nullable static String getAuthorizableRootPath(@NotNull ConfigurationParameters parameters,
                                                 @Nullable AuthorizableType type); @Nullable static String getAuthorizableId(@NotNull Tree authorizableTree); @NotNull static String getAuthorizableId(@NotNull Tree authorizableTree, @NotNull AuthorizableType type); @Nullable static T castAuthorizable(@Nullable Authorizable authorizable, Class<T> authorizableClass); static int getImportBehavior(@NotNull ConfigurationParameters config);  }
@Test public void testGetAdminId() { String altAdminId = "test"; ConfigurationParameters config = ConfigurationParameters.of(UserConstants.PARAM_ADMIN_ID, altAdminId); assertEquals(UserConstants.DEFAULT_ADMIN_ID, UserUtil.getAdminId(ConfigurationParameters.EMPTY)); assertEquals(altAdminId, UserUtil.getAdminId(config)); }