Scope { public static List<String> adminScopes() { return Collections.unmodifiableList( Arrays.asList(APPLICATION_ADMIN, AUTHENTICATOR_ADMIN, CLIENT_ADMIN, IDENTITY_ADMIN, ROLE_ADMIN, USER_ADMIN, SCOPE_ADMIN, TOKEN_ADMIN)); } private  Scope(); static List<String> allScopes(); static List<String> adminScopes(); static List<String> userScopes(); static String forEntity(final AbstractAuthzEntity entity,
                                   final Boolean admin); static final String USER; static final String USER_ADMIN; static final String APPLICATION; static final String APPLICATION_ADMIN; static final String AUTHENTICATOR; static final String AUTHENTICATOR_ADMIN; static final String CLIENT; static final String CLIENT_ADMIN; static final String IDENTITY; static final String IDENTITY_ADMIN; static final String TOKEN; static final String TOKEN_ADMIN; static final String ROLE; static final String ROLE_ADMIN; static final String SCOPE; static final String SCOPE_ADMIN; }
@Test public void testAdminScopeList() { List<String> allScopes = Scope.adminScopes(); assertFalse(allScopes.contains(Scope.APPLICATION)); assertTrue(allScopes.contains(Scope.APPLICATION_ADMIN)); assertFalse(allScopes.contains(Scope.AUTHENTICATOR)); assertTrue(allScopes.contains(Scope.AUTHENTICATOR_ADMIN)); assertFalse(allScopes.contains(Scope.CLIENT)); assertTrue(allScopes.contains(Scope.CLIENT_ADMIN)); assertFalse(allScopes.contains(Scope.USER)); assertTrue(allScopes.contains(Scope.USER_ADMIN)); assertFalse(allScopes.contains(Scope.ROLE)); assertTrue(allScopes.contains(Scope.ROLE_ADMIN)); assertFalse(allScopes.contains(Scope.IDENTITY)); assertTrue(allScopes.contains(Scope.IDENTITY_ADMIN)); assertFalse(allScopes.contains(Scope.SCOPE)); assertTrue(allScopes.contains(Scope.SCOPE_ADMIN)); assertFalse(allScopes.contains(Scope.TOKEN)); assertTrue(allScopes.contains(Scope.TOKEN_ADMIN)); assertEquals(8, allScopes.size()); }