@Test public void testCreateJSONTokenResponse() throws Exception { OAuthClientResponse jsonTokenResponse = OAuthClientResponseFactory .createJSONTokenResponse("{\"access_token\":\"123\"}", OAuth.ContentType.JSON, 200); assertNotNull(jsonTokenResponse); }
public static OAuthClientResponse createJSONTokenResponse(String body, String contentType, int responseCode) throws OAuthProblemException { OAuthJSONAccessTokenResponse resp = new OAuthJSONAccessTokenResponse(); resp.init(body, contentType, responseCode); return resp; }
OAuthClientResponseFactory { public static OAuthClientResponse createJSONTokenResponse(String body, String contentType, int responseCode) throws OAuthProblemException { OAuthJSONAccessTokenResponse resp = new OAuthJSONAccessTokenResponse(); resp.init(body, contentType, responseCode); return resp; } }
OAuthClientResponseFactory { public static OAuthClientResponse createJSONTokenResponse(String body, String contentType, int responseCode) throws OAuthProblemException { OAuthJSONAccessTokenResponse resp = new OAuthJSONAccessTokenResponse(); resp.init(body, contentType, responseCode); return resp; }  }
OAuthClientResponseFactory { public static OAuthClientResponse createJSONTokenResponse(String body, String contentType, int responseCode) throws OAuthProblemException { OAuthJSONAccessTokenResponse resp = new OAuthJSONAccessTokenResponse(); resp.init(body, contentType, responseCode); return resp; }  static OAuthClientResponse createGitHubTokenResponse(String body, String contentType,
                                                                int responseCode); static OAuthClientResponse createJSONTokenResponse(String body, String contentType,
                                                              int responseCode); static T createCustomResponse(String body, String contentType,
                                                                         int responseCode,
                                                                         Map<String, List<String>> headers,
                                                                         Class<T> clazz); static T createCustomResponse(InputStream body, String contentType,
                                                                         int responseCode,
                                                                         Map<String, List<String>> headers,
                                                                         Class<T> clazz); }
OAuthClientResponseFactory { public static OAuthClientResponse createJSONTokenResponse(String body, String contentType, int responseCode) throws OAuthProblemException { OAuthJSONAccessTokenResponse resp = new OAuthJSONAccessTokenResponse(); resp.init(body, contentType, responseCode); return resp; }  static OAuthClientResponse createGitHubTokenResponse(String body, String contentType,
                                                                int responseCode); static OAuthClientResponse createJSONTokenResponse(String body, String contentType,
                                                              int responseCode); static T createCustomResponse(String body, String contentType,
                                                                         int responseCode,
                                                                         Map<String, List<String>> headers,
                                                                         Class<T> clazz); static T createCustomResponse(InputStream body, String contentType,
                                                                         int responseCode,
                                                                         Map<String, List<String>> headers,
                                                                         Class<T> clazz);  }