When building a response with a GenericEntity<> calling getEntity() method on the built reponse will return the enclosed entity of the GenericEntity<>.
The problem is that when building a new response from an existing response that holds a GenericEntity<> using Response.fromResponse(...).build() the new built response
is no longer usable because all information about the generic type have been lost (see ResponseBuilderImplTest.java).
According to the documentation of Response.fromResponse() ("The original response entity instance reference is set in the new response builder") and when looking at the source code of this method it seems that org.jboss.resteasy.specimpl.BuiltResponse.getEntity() should return the original GenericEntity<>.