@Test
public void testUriWithEmptyPath() throws Exception {

    for (ByteBuf buffer : getBuffers()) {
        HttpRequestEncoder encoder = new HttpRequestEncoder();
        encoder.encodeInitialLine(buffer, new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
                "http://localhost:9999/?p1=v1"));
        String req = buffer.toString(Charset.forName("US-ASCII"));
        assertEquals("GET http://localhost:9999/?p1=v1 HTTP/1.1\r\n", req);
        buffer.release();
    }
}