see the in memory test container:
Note that it serializes and buffers the request and response entity if present. It might be possible to avoid that for the response entity, not sure about the request entity. It may also be possible under certain circumstances to match the request/response entity Java instances with the client and server and pass by reference but care has to be taken depending on what assumptions the app is running with.
IIRC you are depending on the injection of some Grizzly request/response artifacts. Under such circumstances those artifacts will not be injected, so you may need to abstract out that information."
Not sure about the lack of injection in some area...Might be more complicated than expected.