@Test public void testUnmarshalWithOK() throws IOException { final String body = "{\"prop\": \"test\"}"; final Response response = mockResponse(HttpResponseStatus.OK.code(), body); final TestBody result = jsonRequestMarshaller.unmarshallResponse(response, TestBody.class); assertEquals("test", result.getProp()); }
@Override public <T> T unmarshallResponse(final Response response, final Type type) throws IOException { return marshallingStrategy.unmarshall(type, response); }
JsonRequestMarshaller implements RequestMarshaller { @Override public <T> T unmarshallResponse(final Response response, final Type type) throws IOException { return marshallingStrategy.unmarshall(type, response); } }
JsonRequestMarshaller implements RequestMarshaller { @Override public <T> T unmarshallResponse(final Response response, final Type type) throws IOException { return marshallingStrategy.unmarshall(type, response); } JsonRequestMarshaller(Module... module); }
JsonRequestMarshaller implements RequestMarshaller { @Override public <T> T unmarshallResponse(final Response response, final Type type) throws IOException { return marshallingStrategy.unmarshall(type, response); } JsonRequestMarshaller(Module... module); @Override void registerTypes(final Type... types); @Override Object[] unmarshallRequestParams(final Request request,
                                          final Method method,
                                          final String[] paramNames); @Override byte[] marshallRequestParams(final Object[] requestParams); @Override HttpContent marshallResponsePart(final Object res,
                                          final HttpResponseStatus status,
                                          final boolean rawStream); @Override FullHttpResponse marshallResponse(final Object res,
                                           final HttpResponseStatus status); @Override HttpResponse marshallResponseHeaders(final boolean rawStream); @Override T unmarshallResponse(final Response response, final Type type); @Override T unmarshallStreamResponse(final Response response, final Type type); JsonRequestMarshaller withModules(Module ... modules); }
JsonRequestMarshaller implements RequestMarshaller { @Override public <T> T unmarshallResponse(final Response response, final Type type) throws IOException { return marshallingStrategy.unmarshall(type, response); } JsonRequestMarshaller(Module... module); @Override void registerTypes(final Type... types); @Override Object[] unmarshallRequestParams(final Request request,
                                          final Method method,
                                          final String[] paramNames); @Override byte[] marshallRequestParams(final Object[] requestParams); @Override HttpContent marshallResponsePart(final Object res,
                                          final HttpResponseStatus status,
                                          final boolean rawStream); @Override FullHttpResponse marshallResponse(final Object res,
                                           final HttpResponseStatus status); @Override HttpResponse marshallResponseHeaders(final boolean rawStream); @Override T unmarshallResponse(final Response response, final Type type); @Override T unmarshallStreamResponse(final Response response, final Type type); JsonRequestMarshaller withModules(Module ... modules);  }