diff --git a/pgpainless-core/src/test/java/org/pgpainless/util/MultiMapTest.java b/pgpainless-core/src/test/java/org/pgpainless/util/MultiMapTest.java index 5bc0c1f7..98688a94 100644 --- a/pgpainless-core/src/test/java/org/pgpainless/util/MultiMapTest.java +++ b/pgpainless-core/src/test/java/org/pgpainless/util/MultiMapTest.java @@ -159,6 +159,26 @@ public class MultiMapTest { assertTrue(map.containsKey("bingo")); } + @Test + public void putAll() { + MultiMap map = new MultiMap<>(); + map.put("A", "1"); + map.put("A", "2"); + map.put("B", "1"); + + MultiMap other = new MultiMap<>(); + other.put("A", "1"); + other.put("B", "2"); + other.put("C", "3"); + + map.putAll(other); + assertTrue(map.get("A").contains("1")); + assertTrue(map.get("A").contains("2")); + assertTrue(map.get("B").contains("1")); + assertTrue(map.get("B").contains("2")); + assertTrue(map.get("C").contains("3")); + } + @Test public void flattenEmptyMap() { MultiMap empty = new MultiMap<>();