### Question:
HeaderUtils { static void removeTransferEncodingChunked(final HttpHeaders headers) { final Iterator<? extends CharSequence> itr = headers.valuesIterator(TRANSFER_ENCODING); while (itr.hasNext()) { if (io.netty.handler.codec.http.HttpHeaderValues.CHUNKED.contentEqualsIgnoreCase(itr.next())) { itr.remove(); } } } private  HeaderUtils();   }### Answer:
@Test public void remoteTransferEncodingChunkedNoHeaders() { assertTrue(httpRequest.headers().isEmpty()); removeTransferEncodingChunked(httpRequest.headers()); assertTrue(httpRequest.headers().isEmpty()); }
@Test public void removeTransferEncodingChunkedWithSomeHeader() { assertTrue(httpRequest.headers().isEmpty()); httpRequest.headers().add("Some-Header", "Some-Value") .add(TRANSFER_ENCODING, "Some-Value") .add(TRANSFER_ENCODING, CHUNKED) .add("Transfer-Encoding", "Chunked") .add(TRANSFER_ENCODING, "cHuNkEd"); assertEquals(5, httpRequest.headers().size()); removeTransferEncodingChunked(httpRequest.headers()); assertFalse(isTransferEncodingChunked(httpRequest.headers())); assertEquals(2, httpRequest.headers().size()); assertNull(httpRequest.headers().get(CONTENT_LENGTH)); }
@Test public void removeTransferEncodingChunkedWithContentLength() { assertTrue(httpRequest.headers().isEmpty()); httpRequest.headers().add(CONTENT_LENGTH, "10") .add(TRANSFER_ENCODING, CHUNKED); assertEquals(2, httpRequest.headers().size()); removeTransferEncodingChunked(httpRequest.headers()); assertFalse(isTransferEncodingChunked(httpRequest.headers())); assertEquals(1, httpRequest.headers().size()); assertEquals("10", httpRequest.headers().get(CONTENT_LENGTH)); }