### Question:
OAuthUtils { public static List<String> getRequestedScopes(Client client, String scopeParameter, boolean useAllClientScopes, boolean partialMatchScopeValidation) { return getRequestedScopes(client, scopeParameter, useAllClientScopes, partialMatchScopeValidation, true); } private  OAuthUtils(); static byte[] createCertificateThumbprint(X509Certificate cert); static void setCertificateThumbprintConfirmation(MessageContext mc, X509Certificate cert); static boolean compareCertificateThumbprints(X509Certificate cert, String encodedThumbprint); static boolean compareTlsCertificates(TLSSessionInfo tlsInfo,
                                          List<String> base64EncodedCerts); static boolean isMutualTls(javax.ws.rs.core.SecurityContext sc, TLSSessionInfo tlsSessionInfo); static String getSubjectDnFromTLSCertificates(X509Certificate cert); static String getIssuerDnFromTLSCertificates(X509Certificate cert); static X509Certificate getRootTLSCertificate(TLSSessionInfo tlsInfo); static void injectContextIntoOAuthProvider(MessageContext context, Object provider); static String setSessionToken(MessageContext mc); static String setSessionToken(MessageContext mc, int maxInactiveInterval); static String setSessionToken(MessageContext mc, String sessionToken); static String setSessionToken(MessageContext mc, String sessionToken, int maxInactiveInterval); static String setSessionToken(MessageContext mc, String sessionToken,
                                                String attribute, int maxInactiveInterval); static String getSessionToken(MessageContext mc); static String getSessionToken(MessageContext mc, String attribute); static String getSessionToken(MessageContext mc, String attribute, boolean remove); static UserSubject createSubject(MessageContext mc, SecurityContext sc); static UserSubject createSubject(SecurityContext securityContext); static String convertPermissionsToScope(List<OAuthPermission> perms); static List<String> convertPermissionsToScopeList(List<OAuthPermission> perms); static boolean isGrantSupportedForClient(Client client,
                                                    boolean canSupportPublicClients,
                                                    String grantType); static List<String> parseScope(String requestedScope); static String generateRandomTokenKey(); static String generateRandomTokenKey(int byteSize); static long getIssuedAt(); static boolean isExpired(Long issuedAt, Long lifetime); static boolean validateAudience(String providedAudience,
                                           List<String> allowedAudiences); static boolean validateAudiences(List<String> providedAudiences,
                                            List<String> allowedAudiences); static boolean checkRequestURI(String servletPath, String uri); static List<String> getRequestedScopes(Client client,
                                                  String scopeParameter,
                                                  boolean useAllClientScopes,
                                                  boolean partialMatchScopeValidation); static List<String> getRequestedScopes(Client client,
                                                  String scopeParameter,
                                                  boolean useAllClientScopes,
                                                  boolean partialMatchScopeValidation,
                                                  boolean defaultToRegisteredScopes); static boolean validateScopes(List<String> requestScopes, List<String> registeredScopes,
                                         boolean partialMatchScopeValidation); static ClientAccessToken toClientAccessToken(ServerAccessToken serverToken, boolean supportOptionalParams); static JwsSignatureProvider getClientSecretSignatureProvider(String clientSecret); static JwsSignatureVerifier getClientSecretSignatureVerifier(String clientSecret); static JweDecryptionProvider getClientSecretDecryptionProvider(String clientSecret); static JweEncryptionProvider getClientSecretEncryptionProvider(String clientSecret); static SignatureAlgorithm getClientSecretSignatureAlgorithm(Properties sigProps); static String convertListOfScopesToString(List<String> registeredScopes);  }### Answer:
@Test public void testGetRequestedScopesRegistered() { Client c = new Client(); List<String> scopes = Collections.singletonList("a"); c.setRegisteredScopes(scopes); assertEquals(scopes, OAuthUtils.getRequestedScopes(c, "", false, false)); }