### Question:
WebSocketClientHandshaker { static String rawPath(URI wsURL) { String path = wsURL.getRawPath(); String query = wsURL.getRawQuery(); if (query != null && !query.isEmpty()) { path = path + '?' + query; } return path == null || path.isEmpty() ? "/" : path; } protected  WebSocketClientHandshaker(URI uri, WebSocketVersion version, String subprotocol,
                                        HttpHeaders customHeaders, int maxFramePayloadLength); URI uri(); WebSocketVersion version(); int maxFramePayloadLength(); boolean isHandshakeComplete(); String expectedSubprotocol(); String actualSubprotocol(); ChannelFuture handshake(Channel channel); final ChannelFuture handshake(Channel channel, final ChannelPromise promise); final void finishHandshake(Channel channel, FullHttpResponse response); final ChannelFuture processHandshake(final Channel channel, HttpResponse response); final ChannelFuture processHandshake(final Channel channel, HttpResponse response,
                                                final ChannelPromise promise); ChannelFuture close(Channel channel, CloseWebSocketFrame frame); ChannelFuture close(Channel channel, CloseWebSocketFrame frame, ChannelPromise promise);  }### Answer:
@Test public void testRawPath() { URI uri = URI.create("ws: WebSocketClientHandshaker handshaker = newHandshaker(uri); FullHttpRequest request = handshaker.newHandshakeRequest(); try { assertEquals("/path%20with%20ws", request.getUri()); } finally { request.release(); } }