Scope { public static List<String> userScopes() { return Collections.unmodifiableList( Arrays.asList(APPLICATION, AUTHENTICATOR, CLIENT, IDENTITY, ROLE, USER, SCOPE, TOKEN)); } 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 testUserScopeList() { List<String> allScopes = Scope.userScopes(); assertTrue(allScopes.contains(Scope.APPLICATION)); assertFalse(allScopes.contains(Scope.APPLICATION_ADMIN)); assertTrue(allScopes.contains(Scope.AUTHENTICATOR)); assertFalse(allScopes.contains(Scope.AUTHENTICATOR_ADMIN)); assertTrue(allScopes.contains(Scope.CLIENT)); assertFalse(allScopes.contains(Scope.CLIENT_ADMIN)); assertTrue(allScopes.contains(Scope.USER)); assertFalse(allScopes.contains(Scope.USER_ADMIN)); assertTrue(allScopes.contains(Scope.ROLE)); assertFalse(allScopes.contains(Scope.ROLE_ADMIN)); assertTrue(allScopes.contains(Scope.IDENTITY)); assertFalse(allScopes.contains(Scope.IDENTITY_ADMIN)); assertTrue(allScopes.contains(Scope.SCOPE)); assertFalse(allScopes.contains(Scope.SCOPE_ADMIN)); assertTrue(allScopes.contains(Scope.TOKEN)); assertFalse(allScopes.contains(Scope.TOKEN_ADMIN)); assertEquals(8, allScopes.size()); }