### Question:
OpenAMScopeValidator implements ScopeValidator { public Set<String> validateRefreshTokenScope(ClientRegistration clientRegistration, Set<String> requestedScope, Set<String> tokenScope, OAuth2Request request) throws ServerException, InvalidScopeException { return validateScopes(requestedScope, tokenScope, tokenScope, request); } @Inject  OpenAMScopeValidator(IdentityManager identityManager, OpenIDTokenIssuer openIDTokenIssuer,
            OAuth2ProviderSettingsFactory providerSettingsFactory, OpenAMSettings openAMSettings,
            @Named(OIDC_CLAIMS_NAME) ScriptEvaluator scriptEvaluator,
            OpenIdConnectClientRegistrationStore clientRegistrationStore,
            ScriptingServiceFactory scriptingServiceFactory); Set<String> validateAuthorizationScope(ClientRegistration client, Set<String> scope,
            OAuth2Request request); Set<String> validateAccessTokenScope(ClientRegistration client, Set<String> scope,
            OAuth2Request request); Set<String> validateRefreshTokenScope(ClientRegistration clientRegistration, Set<String> requestedScope,
            Set<String> tokenScope, OAuth2Request request); UserInfoClaims getUserInfo(AccessToken token, OAuth2Request request); Map<String, Object> evaluateScope(AccessToken accessToken); Map<String, String> additionalDataToReturnFromAuthorizeEndpoint(Map<String, Token> tokens,
            OAuth2Request request); void additionalDataToReturnFromTokenEndpoint(AccessToken accessToken, OAuth2Request request);  }### Answer:
@Test public void shouldReturnValidRefreshTokenScopes() throws Exception { when(client.getAllowedScopes()).thenReturn(asSet("x", "y", "z")); Set<String> scopes = validator.validateRefreshTokenScope(client, asSet("a", "b"), asSet("a", "b", "c"), request); assertThat(scopes).containsOnly("a", "b"); }