assertEquals(map.get("baz"), Arrays.asList("foo", "bar"));
}
@Test
public void replaceArrayTest() {
FluentStringsMap map = new FluentStringsMap();
map.add("foo", "bar");
map.add("baz", Arrays.asList("foo", "bar"));
assertEquals(map.keySet(), new LinkedHashSet<String>(Arrays.asList("foo", "baz")));
assertEquals(map.getFirstValue("foo"), "bar");
assertEquals(map.getJoinedValue("foo", ", "), "bar");
assertEquals(map.get("foo"), Arrays.asList("bar"));
assertEquals(map.getFirstValue("baz"), "foo");
assertEquals(map.getJoinedValue("baz", ", "), "foo, bar");
assertEquals(map.get("baz"), Arrays.asList("foo", "bar"));
map.replaceWith("foo", "blub", "bla");
assertEquals(map.keySet(), new LinkedHashSet<String>(Arrays.asList("foo", "baz")));
assertEquals(map.getFirstValue("foo"), "blub");
assertEquals(map.getJoinedValue("foo", ", "), "blub, bla");
assertEquals(map.get("foo"), Arrays.asList("blub", "bla"));
assertEquals(map.getFirstValue("baz"), "foo");
assertEquals(map.getJoinedValue("baz", ", "), "foo, bar");
assertEquals(map.get("baz"), Arrays.asList("foo", "bar"));
}