assertNull(map.get("baz"));
}
@Test
public void replaceAllMapTest1() {
FluentCaseInsensitiveStringsMap map = new FluentCaseInsensitiveStringsMap();
map.add("foo", "bar");
map.add("bar", "foo, bar", "baz");
map.add("baz", Arrays.asList("foo", "bar"));
assertEquals(map.keySet(), new LinkedHashSet<String>(Arrays.asList("foo", "bar", "baz")));
assertEquals(map.getFirstValue("foo"), "bar");
assertEquals(map.getJoinedValue("foo", ", "), "bar");
assertEquals(map.get("foo"), Arrays.asList("bar"));
assertEquals(map.getFirstValue("bar"), "foo, bar");
assertEquals(map.getJoinedValue("bar", ", "), "foo, bar, baz");
assertEquals(map.get("bar"), Arrays.asList("foo, bar", "baz"));
assertEquals(map.getFirstValue("baz"), "foo");
assertEquals(map.getJoinedValue("baz", ", "), "foo, bar");
assertEquals(map.get("baz"), Arrays.asList("foo", "bar"));
map.replaceAll(new FluentCaseInsensitiveStringsMap().add("Bar", "baz").add("Boo", "blub", "bla"));
assertEquals(map.keySet(), new LinkedHashSet<String>(Arrays.asList("foo", "Bar", "baz", "Boo")));
assertEquals(map.getFirstValue("foo"), "bar");
assertEquals(map.getJoinedValue("foo", ", "), "bar");
assertEquals(map.get("foo"), Arrays.asList("bar"));
assertEquals(map.getFirstValue("bar"), "baz");
assertEquals(map.getJoinedValue("bar", ", "), "baz");
assertEquals(map.get("bar"), Arrays.asList("baz"));
assertEquals(map.getFirstValue("baz"), "foo");
assertEquals(map.getJoinedValue("baz", ", "), "foo, bar");
assertEquals(map.get("baz"), Arrays.asList("foo", "bar"));
assertEquals(map.getFirstValue("Boo"), "blub");
assertEquals(map.getJoinedValue("Boo", ", "), "blub, bla");
assertEquals(map.get("Boo"), Arrays.asList("blub", "bla"));
}