Http2Handler extends Http2EventAdapter { static String getPathFromHeaders(Http2Headers headers) { String uri = headers.path().toString(); return XUrl.path(uri); } Http2Handler(Http2ConnectionEncoder encoder, int maxPayloadBytes, Http2CorsHandler corsHandler); @Override int onDataRead(
      ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding, boolean endOfStream); @Override void onHeadersRead(
      ChannelHandlerContext ctx,
      int streamId,
      Http2Headers headers,
      int padding,
      boolean endOfStream); @Override void onHeadersRead(
      ChannelHandlerContext ctx,
      int streamId,
      Http2Headers headers,
      int streamDependency,
      short weight,
      boolean exclusive,
      int padding,
      boolean endOfStream); @Override void onStreamRemoved(Http2Stream stream);  }
@Test void getPathFromHeaders_withQueryString() { headers.path("/foo/extracted?query1=abc&query2=123"); String path = Http2Handler.getPathFromHeaders(headers); assertEquals("/foo/extracted", path); }
@Test void getPathFromHeaders_withNoQueryString() { headers.path("/foo/extracted"); String path = Http2Handler.getPathFromHeaders(headers); assertEquals("/foo/extracted", path); }