FederationScopeClaimTranslationService implements ScopeClaimTranslationService { @Override public Set<String> getClaimsForScopeSet(Set<String> scopes) { return scopes.contains("openid") ? claims : noClaims; } FederationScopeClaimTranslationService(); @Override Set<String> getClaimsForScope(String scope); @Override Set<String> getClaimsForScopeSet(Set<String> scopes);  }
@Test public void testGetEmptyClaimsForScopeSet() throws Exception { Set claims = subject.getClaimsForScopeSet(new HashSet(Arrays.asList("bogus"))); assertTrue(claims.isEmpty()); }
@Test public void testGetClaimsForScopeSet() throws Exception { Set claims = subject.getClaimsForScopeSet(new HashSet(Arrays.asList("bogus", "openid"))); assertEquals(subject.allClaims(), claims); }