@Test
public void invalidConnectionHeader() throws Exception {
final SockJsConfig config = SockJsConfig.withPrefix("/echo").build();
final EmbeddedChannel ch = webSocketChannel(config);
final FullHttpRequest request = webSocketUpgradeRequest("/websocket", WebSocketVersion.V13);
request.headers().set(UPGRADE, "WebSocket");
request.headers().set(CONNECTION, "close");
ch.writeInbound(request);
final FullHttpResponse response = decodeFullHttpResponse(ch);
assertThat(response.getStatus(), is(BAD_REQUEST));
assertThat(response.content().toString(CharsetUtil.UTF_8), equalTo("\"Connection\" must be \"Upgrade\"."));