### Question:
XsuaaToken extends AbstractToken implements AccessToken { @Override public boolean hasLocalScope(@Nonnull String scope) { Assertions.assertNotNull(scopeConverter, "hasLocalScope() method requires a scopeConverter, which must not be null"); return scopeConverter.convert(getScopes()).contains(scope); } XsuaaToken(@Nonnull DecodedJwt decodedJwt);  XsuaaToken(@Nonnull String accessToken); XsuaaToken withScopeConverter(@Nullable ScopeConverter converter); @Override Set<String> getScopes(); @Override Principal getPrincipal(); @Override Service getService(); @Override boolean hasScope(String scope); @Override boolean hasLocalScope(@Nonnull String scope); @Override GrantType getGrantType(); @Nullable String getSubdomain(); @Nullable String getSubaccountId(); @Override String getZoneId();  }### Answer:
@Test public void hasLocalScope() { clientCredentialsToken.withScopeConverter(new XsuaaScopeConverter("uaa")); assertThat(clientCredentialsToken.hasScope("uaa.resource")).isTrue(); assertThat(clientCredentialsToken.hasLocalScope("resource")).isTrue(); }