### Question:
ResponseImpl extends Response { @Override public Object getEntity() { return InjectionUtils.getEntity(getActualEntity()); } ResponseImpl(int statusCode);   ResponseImpl(int statusCode, Object entity);   ResponseImpl(int statusCode, Object entity, String reasonPhrase); void addMetadata(MultivaluedMap<String, Object> meta); void setStatus(int statusCode); void setStatus(int statusCode, String reasonPhrase); void setEntity(Object e, Annotation[] anns); void setEntityAnnotations(Annotation[] anns); Annotation[] getEntityAnnotations(); void setOutMessage(Message message); Message getOutMessage(); @Override int getStatus(); @Override StatusType getStatusInfo(); Object getActualEntity(); @Override Object getEntity(); @Override boolean hasEntity(); @Override MultivaluedMap<String, Object> getMetadata(); @Override MultivaluedMap<String, Object> getHeaders(); @Override MultivaluedMap<String, String> getStringHeaders(); @Override String getHeaderString(String header); @Override Set<String> getAllowedMethods(); @Override Map<String, NewCookie> getCookies(); @Override Date getDate(); @Override EntityTag getEntityTag(); @Override Locale getLanguage(); @Override Date getLastModified(); @Override int getLength(); @Override URI getLocation(); @Override MediaType getMediaType(); @Override boolean hasLink(String relation); @Override Link getLink(String relation); @Override Link.Builder getLinkBuilder(String relation); @Override Set<Link> getLinks(); @Override T readEntity(Class<T> cls); @Override T readEntity(GenericType<T> genType); @Override T readEntity(Class<T> cls, Annotation[] anns); @Override @SuppressWarnings("unchecked") T readEntity(GenericType<T> genType, Annotation[] anns); T doReadEntity(Class<T> cls, Type t, Annotation[] anns); T doReadEntity(Class<T> cls, Type t, Annotation[] anns, boolean closeAfterRead); InputStream convertEntityToStreamIfPossible(); @Override boolean bufferEntity(); @Override void close();  }### Answer:
@Test public void testGetEntityUnwrapped() { final Book book = new Book(); Response r = Response.ok().entity( new GenericEntity<Book>(book) { } ).build(); assertSame(book, r.getEntity()); }
@Test public void testGetEntity() { final Book book = new Book(); Response r = Response.ok().entity(book).build(); assertSame(book, r.getEntity()); }