GrizzlyServerHttpExchange extends AbstractServerHttpExchange { @Override public <T> T unwrap(Class<T> clazz) { return Request.class.isAssignableFrom(clazz) ? clazz.cast(request) : Response.class.isAssignableFrom(clazz) ? clazz.cast(response) : null; } @SuppressWarnings("deprecation")  GrizzlyServerHttpExchange(Request request, Response response); @Override String uri(); @Override HttpMethod method(); @Override Set<String> headerNames(); @Override List<String> headers(String name); @Override T unwrap(Class<T> clazz);  }
@Test public void unwrap() throws Throwable { requestAction(http -> { threadAssertTrue(http.unwrap(Request.class) instanceof Request); threadAssertTrue(http.unwrap(Response.class) instanceof Response); resume(); }); client.newRequest(uri()).send(new org.eclipse.jetty.client.api.Response.Listener.Adapter()); await(); }