final FullHttpRequest request = HttpUtil.webSocketUpgradeRequest("/websocket", version);
ch.writeInbound(request);
final HttpResponse response = HttpUtil.decode(ch);
assertThat(response.getStatus(), is(HttpResponseStatus.SWITCHING_PROTOCOLS));
assertThat(response.headers().get(CONNECTION), equalTo("Upgrade"));
assertThat(response.headers().get(UPGRADE), equalTo("websocket"));
assertThat(response.headers().get(CONTENT_LENGTH), is(nullValue()));
}
private static FullHttpRequest webSocketUpgradeRequest(final String path, final WebSocketVersion version) {
final FullHttpRequest req = new DefaultFullHttpRequest(HTTP_1_1, GET, path);