/*
 * Copyright 2013 The Netty Project
 *
 * The Netty Project licenses this file to you under the Apache License,
 * version 2.0 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at:
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package io.netty.handler.codec.http;

import org.junit.Assert;
import org.junit.Test;

import java.util.List;

public class HttpHeadersTest {

    @Test
    public void testRemoveTransferEncodingIgnoreCase() {
        HttpMessage message = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
        message.headers().set(HttpHeaders.Names.TRANSFER_ENCODING, "Chunked");
        HttpHeaders.removeTransferEncodingChunked(message);
        Assert.assertTrue(message.headers().isEmpty());
    }

    // Test for https://github.com/netty/netty/issues/1690
    @Test
    public void testGetOperations() {
        HttpHeaders headers = new DefaultHttpHeaders();
        headers.add("Foo", "1");
        headers.add("Foo", "2");

        Assert.assertEquals("1", headers.get("Foo"));

        List<String> values = headers.getAll("Foo");
        Assert.assertEquals(2, values.size());
        Assert.assertEquals("1", values.get(0));
        Assert.assertEquals("2", values.get(1));
    }
}

@@ -739,16 +739,104 @@
 .List;%0A%0A
+import static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A
 public c
@@ -1716,11 +1716,363 @@
 );%0A    %7D
+%0A%0A    @Test%0A    public void testEquansIgnoreCase() %7B%0A        assertThat(HttpHeaders.equalsIgnoreCase(null, null), is(true));%0A        assertThat(HttpHeaders.equalsIgnoreCase(null, %22foo%22), is(false));%0A        assertThat(HttpHeaders.equalsIgnoreCase(%22bar%22, null), is(false));%0A        assertThat(HttpHeaders.equalsIgnoreCase(%22FoO%22, %22fOo%22), is(true));%0A    %7D
 %0A%7D%0A

Add test case for HttpHeaders.equalsIgnoreCase(...)