### Question:
PropertySplitter { public Map<String, Collection<String>> mapOfList(String property) { if (property == null) { return new HashMap<>(); } Map<String, String> map = this.map(property, "|"); Map<String, Collection<String>> mapOfList = new HashMap<>(); for (Entry<String, String> entry : map.entrySet()) { mapOfList.put(entry.getKey(), this.list(entry.getValue())); } return mapOfList; }  Map<String, String> map(String property); Map<String, Collection<String>> mapOfList(String property); Collection<String> list(String property); Collection<Collection<String>> groupedList(String property);  }### Answer:
@Test public void testMapOfList() { Assert.assertEquals(0, propertySplitter.mapOfList(null).size()); Assert.assertEquals(0, propertySplitter.mapOfList("|").size()); Assert.assertEquals(2, propertySplitter.mapOfList("KEY1:VALUE1.1,VALUE1.2|KEY2:VALUE2.1,VALUE2.2").size()); Assert.assertTrue(propertySplitter.map("KEY1:VALUE1,KEY2:VALUE2").get("KEY1") .contains("VALUE1")); Assert.assertTrue(propertySplitter.map("KEY1:VALUE1,KEY2:VALUE2").get("KEY2") .contains("VALUE2")); }