assertNull(map.get("baz"));
}
@Test
public void replaceAllMapTest1() {
FluentStringsMap map = new FluentStringsMap();
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 FluentStringsMap().add("bar", "baz").add("Foo", "blub", "bla"));
assertEquals(map.keySet(), new LinkedHashSet<String>(Arrays.asList("foo", "bar", "baz", "Foo")));
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("Foo"), "blub");
assertEquals(map.getJoinedValue("Foo", ", "), "blub, bla");
assertEquals(map.get("Foo"), Arrays.asList("blub", "bla"));
}