eclipse-ee4j / eclipse-ee4j/jersey
InboundJaxrsResponse not Equal to OutboundJaxrsResponse
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to test one of my Resource methods but it seems not to work. This is what I've tried so far.
I logged the Response being returned with this code
`log.info("I am the response: " + Response.status(Response.Status.CREATED).entity(inserted).build());`
and it showed
`I am the response: OutboundJaxrsResponse{status=201, reason=Created, hasEntity=true, closed=false, buffered=false}`
but in the test method, I used this code to get the response from the method
`response = target.request(MediaType.APPLICATION_JSON).post(Entity.entity(l, MediaType.APPLICATION_JSON));` .
I also logged this Response with this code `log.info("The available response is: " + target.request(MediaType.APPLICATION_JSON).post(Entity.entity(l, MediaType.APPLICATION_JSON)));`
and I got the response as `The available response is: InboundJaxrsResponse{context=ClientResponse{method=POST, uri=http://localhost:32774/v1/ledgers/by-id/OLDR9750JGGB5T2L4P6TC36ND, status=200, reason=OK}}`
Please help
Contributor guide
Assessment
This issue has not been assessed yet.