### Question:
OpenAMClientRegistration implements OpenIdConnectClientRegistration { public Map<String, String> getScopeDescriptions(Locale locale) throws ServerException { final Set<String> combinedScopes = new HashSet<>(); combinedScopes.addAll(getAllowedGrantScopes()); combinedScopes.addAll(getDefaultGrantScopes()); return getTranslations(locale, combinedScopes, providerSettings.getSupportedScopesWithTranslations()); } OpenAMClientRegistration(AMIdentity amIdentity, PEMDecoder pemDecoder, OpenIdResolverService resolverService,
            OAuth2ProviderSettings providerSettings, ClientAuthenticationFailureFactory failureFactory); Set<URI> getRedirectUris(); @Override Set<URI> getPostLogoutRedirectUris(); Set<String> getAllowedResponseTypes(); String getClientSecret(); String getClientId(); String getAccessTokenType(); String getDisplayName(Locale locale); String getDisplayDescription(Locale locale); Map<String, String> getScopeDescriptions(Locale locale); Map<String, String> getClaimDescriptions(Locale locale); Set<String> getDefaultScopes(); Set<String> getAllowedScopes(); boolean isConfidential(); String getClientSessionURI(); ClientType getClientType(); long getAuthorizationCodeLifeTime(OAuth2ProviderSettings providerSettings); long getAccessTokenLifeTime(OAuth2ProviderSettings providerSettings); long getRefreshTokenLifeTime(OAuth2ProviderSettings providerSettings); long getJwtTokenLifeTime(OAuth2ProviderSettings providerSettings); String getIDTokenSignedResponseAlgorithm(); String getTokenEndpointAuthMethod(); String getSubjectType(); @Override boolean verifyJwtIdentity(OAuth2Jwt jwt); @Override URI getSectorIdentifierUri(); String getSubValue(String id, OAuth2ProviderSettings providerSettings);  }### Answer:
@Test public void testGetScopeDescriptions() throws Exception { when(amIdentity.getAttribute(DEFAULT_SCOPES)).thenReturn(asSet( "[0]=scope1", "[1]=scope2|Default", "[2]=scope2|fr|En Français", "[3]=scope3|en|Default English", "[4]=scope3|en_GB|British, innit", "[5]=scope3|en_US|American y'all", "[6]=scope4", "[7]=scope4|en|English only", "[8]=scope5|Default with overridden French exclusion", "[9]=scope5|fr|", "[10]=scope6|en|Included in English", "[11]=scope6|" )); when(providerSettings.getSupportedScopesWithTranslations()).thenReturn(asSet( "scope1", "scope2", "scope2|fr_FR|Pas en Français", "scope3", "scope4", "scope5", "scope6", "scope7", "scope8", "scope8|fr|Aussi en Français", "scope8|en|In English" )); Map<String, String> french = clientRegistration.getScopeDescriptions(Locale.FRANCE); Map<String, String> english = clientRegistration.getScopeDescriptions(Locale.UK); assertThat(french).containsOnly( entry("scope1", "scope1"), entry("scope2", "En Français"), entry("scope3", "scope3"), entry("scope4", "scope4"), entry("scope7", "scope7"), entry("scope8", "Aussi en Français")); assertThat(english).containsOnly( entry("scope1", "scope1"), entry("scope2", "Default"), entry("scope3", "British, innit"), entry("scope4", "English only"), entry("scope5", "Default with overridden French exclusion"), entry("scope6", "Included in English"), entry("scope7", "scope7"), entry("scope8", "In English") ); }