'How to test a reasteasy client proxy
I developed a resteasy client for an external web service using RESTEasy Proxy Framework.
something like that:
public interface AnalyticsProvider {
@GET
@Path("/environments")
@Produces({ MediaType.APPLICATION_JSON})
List<String> getEnvironments();
@POST
@Path("/summary")
@Produces({ MediaType.APPLICATION_JSON})
@Consumes({ MediaType.APPLICATION_JSON})
List<CodeObjectSummary> getSummaries(CodeObjectSummaryRequest summaryRequest);
}
what are the ways to test it ? i mainly want to test serialisation and behaviour of the client code. one option i found is using okhttp3.mockwebserver.MockWebServer to mock a web server.
any other options?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
