### Question:
ClientResponse extends InboundMessageContext implements ClientResponseContext, InjectionManagerSupplier { public <T> T readEntity(Class<T> entityType) throws ProcessingException, IllegalStateException { return readEntity(entityType, requestContext.getPropertiesDelegate()); } ClientResponse(final ClientRequest requestContext, final Response response);  ClientResponse(Response.StatusType status, ClientRequest requestContext);  ClientResponse(Response.StatusType status, ClientRequest requestContext, URI resolvedRequestUri); @Override int getStatus(); @Override void setStatus(int code); @Override void setStatusInfo(Response.StatusType status); @Override Response.StatusType getStatusInfo(); URI getResolvedRequestUri(); void setResolvedRequestUri(final URI uri); ClientRequest getRequestContext(); @Override Map<String, NewCookie> getCookies(); @Override Set<Link> getLinks(); @Override String toString(); Object getEntity(); T readEntity(Class<T> entityType); @SuppressWarnings("unchecked") T readEntity(GenericType<T> entityType); T readEntity(Class<T> entityType, Annotation[] annotations); @SuppressWarnings("unchecked") T readEntity(GenericType<T> entityType, Annotation[] annotations); @Override InjectionManager getInjectionManager();  }### Answer:
@Test public void testHasEntity() { final ClientRequestFilter abortFilter = requestContext -> requestContext.abortWith(Response.ok("hello").build()); try (Response r = ClientBuilder.newClient().register(abortFilter).target("http: Assert.assertTrue(r.hasEntity()); r.bufferEntity(); Assert.assertTrue(r.hasEntity()); final String s = r.readEntity(String.class); Assert.assertTrue(r.hasEntity()); final InputStream bufferedEntityStream = r.readEntity(InputStream.class); Assert.assertNotNull(bufferedEntityStream); Assert.assertTrue(r.hasEntity()); } }