Mock or build a Jersey InboundJaxrsResponse
问题 I'm fairly new developing jersey client, and has run into some problems with some testing. First off all I maybe should mention that my application is all client side, no server side stuff at all. My problem is that I would like to create a Response object of instance InboundJaxrsResponse , so far I've tried to achieve this by mocking a Response using Mockito and ResponseBuilder.build() Using Mockito: Response response = mock(Response.class); when(response.readEntity(InputStream.class))