assertEquals(map.keySet().size(), 0);
}
@Test
public void copyConstructorTest() {
FluentCaseInsensitiveStringsMap srcHeaders = new FluentCaseInsensitiveStringsMap();
srcHeaders.add("foo", "baz,foo");
srcHeaders.add("baz", Arrays.asList("bar"));
srcHeaders.add("bar", "bla", "blubb");
FluentCaseInsensitiveStringsMap map = new FluentCaseInsensitiveStringsMap(srcHeaders);
srcHeaders.delete("foo");
srcHeaders.delete("bar");
srcHeaders.delete("baz");
assertTrue(srcHeaders.keySet().isEmpty());
assertEquals(map.keySet(), new LinkedHashSet<String>(Arrays.asList("foo", "baz", "bar")));
assertEquals(map.getFirstValue("foo"), "baz,foo");
assertEquals(map.getJoinedValue("foo", ", "), "baz,foo");
assertEquals(map.get("foo"), Arrays.asList("baz,foo"));
assertEquals(map.getFirstValue("baz"), "bar");
assertEquals(map.getJoinedValue("baz", ", "), "bar");
assertEquals(map.get("baz"), Arrays.asList("bar"));
assertEquals(map.getFirstValue("bar"), "bla");
assertEquals(map.getJoinedValue("bar", ", "), "bla, blubb");
assertEquals(map.get("bar"), Arrays.asList("bla", "blubb"));
}