@@ -81,8 +81,9 @@ public void nullDataNullErrorsReturnsEmptyResponseObject() throws ApiException {
8181
8282 // Act! Parse it into a model.
8383 Type responseType = TypeMaker .getParameterizedType (PaginatedResult .class , Todo .class );
84+ GraphQLRequest <PaginatedResult <Todo >> request = buildDummyRequest (responseType );
8485 final GraphQLResponse <PaginatedResult <Todo >> response =
85- responseFactory .buildResponse (null , nullResponseJson , responseType );
86+ responseFactory .buildResponse (request , nullResponseJson );
8687
8788 // Assert that the model is constructed without content
8889 assertNotNull (response );
@@ -107,7 +108,7 @@ public void partialResponseRendersWithTodoDataAndErrors() throws ApiException {
107108 Type responseType = TypeMaker .getParameterizedType (PaginatedResult .class , Todo .class );
108109 GraphQLRequest <PaginatedResult <Todo >> request = buildDummyRequest (responseType );
109110 final GraphQLResponse <PaginatedResult <Todo >> response =
110- responseFactory .buildResponse (request , partialResponseJson , responseType );
111+ responseFactory .buildResponse (request , partialResponseJson );
111112
112113 // Assert that the model contained things...
113114 assertNotNull (response );
@@ -222,7 +223,7 @@ public void responseRendersAsPaginatedResult() throws AmplifyException {
222223
223224 final GraphQLRequest <PaginatedResult <Todo >> request = buildDummyRequest (responseType );
224225 final GraphQLResponse <PaginatedResult <Todo >> response =
225- responseFactory .buildResponse (request , partialResponseJson , responseType );
226+ responseFactory .buildResponse (request , partialResponseJson );
226227
227228 // Assert
228229 assertEquals (expectedResponse , response );
@@ -248,8 +249,9 @@ public void errorResponseDeserializesExtensionsMap() throws ApiException {
248249
249250 // Act! Parse it into a model.
250251 Type responseType = TypeMaker .getParameterizedType (PaginatedResult .class , Todo .class );
252+ GraphQLRequest <PaginatedResult <Todo >> request = buildDummyRequest (responseType );
251253 final GraphQLResponse <PaginatedResult <Todo >> response =
252- responseFactory .buildResponse (null , partialResponseJson , responseType );
254+ responseFactory .buildResponse (request , partialResponseJson );
253255
254256 // Build the expected response.
255257 String message = "Conflict resolver rejects mutation." ;
@@ -298,8 +300,9 @@ public void errorWithNullFieldsCanBeParsed() throws ApiException {
298300
299301 // Act! Parse it into a model.
300302 Type responseType = TypeMaker .getParameterizedType (PaginatedResult .class , Todo .class );
303+ GraphQLRequest <PaginatedResult <Todo >> request = buildDummyRequest (responseType );
301304 final GraphQLResponse <PaginatedResult <Todo >> response =
302- responseFactory .buildResponse (null , responseJson , responseType );
305+ responseFactory .buildResponse (request , responseJson );
303306
304307 // Build the expected response.
305308 Map <String , Object > extensions = new HashMap <>();
@@ -331,7 +334,7 @@ public void partialResponseCanBeRenderedAsStringType() throws JSONException, Api
331334
332335 // Act! Parse it into a String data type.
333336 final GraphQLResponse <String > response =
334- responseFactory .buildResponse (request , partialResponseJson .toString (), String . class );
337+ responseFactory .buildResponse (request , partialResponseJson .toString ());
335338
336339 // Assert that the response data is just the data block as a JSON string
337340 assertEquals (
@@ -352,7 +355,7 @@ public void syncQueryResponseCanBeRenderedAsStringType() throws ApiException {
352355 Type responseType = TypeMaker .getParameterizedType (Iterable .class , String .class );
353356 GraphQLRequest <Iterable <String >> request = buildDummyRequest (responseType );
354357 GraphQLResponse <Iterable <String >> response =
355- responseFactory .buildResponse (request , baseQueryResponseJson .toString (), responseType );
358+ responseFactory .buildResponse (request , baseQueryResponseJson .toString ());
356359 final Iterable <String > queryResults = response .getData ();
357360
358361 final List <String > resultJsons = new ArrayList <>();
@@ -434,7 +437,7 @@ public void awsDateTypesCanBeDeserialized() throws ApiException {
434437 Type responseType = TypeMaker .getParameterizedType (PaginatedResult .class , Meeting .class );
435438 GraphQLRequest <PaginatedResult <Meeting >> request = buildDummyRequest (responseType );
436439 final GraphQLResponse <PaginatedResult <Meeting >> response =
437- responseFactory .buildResponse (request , responseString , responseType );
440+ responseFactory .buildResponse (request , responseString );
438441 final Iterable <Meeting > actualMeetings = response .getData ().getItems ();
439442
440443 // Assert
0 commit comments