@Test
public void testDoubleChunkedHeader() {

    HttpMessage message = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
    message.headers().add(HttpHeaderNames.TRANSFER_ENCODING, "chunked");
    HttpUtil.setTransferEncodingChunked(message, true);
    List<String> expected = Collections.singletonList("chunked");
    assertEquals(expected, message.headers().getAll(HttpHeaderNames.TRANSFER_ENCODING));
}