@Test public void toJson() throws Exception { AccessToken accessToken = new AccessToken(2592000, Arrays.asList(Scope.REQUEST, Scope.ALL_TRIPS, Scope.PROFILE), "Access999Token", "888RefreshToken", "Bearer"); Collection<Scope> scopes = accessToken.getScopes(); String json = jsonAdapter.toJson(accessToken); assertThat(json).containsOnlyOnce("\"scope\":\"" + Scope.toStandardString(scopes) + "\""); }
@ToJson String toJson(@OAuthScopes Set<Scope> scopes) { return Scope.toStandardString(scopes); }
OAuthScopesAdapter { @ToJson String toJson(@OAuthScopes Set<Scope> scopes) { return Scope.toStandardString(scopes); } }
OAuthScopesAdapter { @ToJson String toJson(@OAuthScopes Set<Scope> scopes) { return Scope.toStandardString(scopes); }  }
OAuthScopesAdapter { @ToJson String toJson(@OAuthScopes Set<Scope> scopes) { return Scope.toStandardString(scopes); }   }
OAuthScopesAdapter { @ToJson String toJson(@OAuthScopes Set<Scope> scopes) { return Scope.toStandardString(scopes); }    }