### Question:
ConfigurationPropertyValidator { public static Map<String, String> parseMapProperty(String property) { Map<String, String> result = new LinkedHashMap<>(); List<String> entries = parseListProperty(property); for (String entry : entries) { Matcher matcher = KEY_VALUE_PATTERN.matcher(entry); if (!matcher.matches()) { throw new IllegalArgumentException("'" + entry + "' is not a valid key-value pair"); } result.put(matcher.group("name"), matcher.group("value")); } return result; } private  ConfigurationPropertyValidator(); static Optional<Credential> getImageCredential(
      Consumer<LogEvent> logger,
      String usernameProperty,
      String passwordProperty,
      AuthProperty auth,
      RawConfiguration rawConfiguration); static ImageReference getGeneratedTargetDockerTag(
      @Nullable String targetImage,
      ProjectProperties projectProperties,
      HelpfulSuggestions helpfulSuggestions); static Map<String, String> parseMapProperty(String property); static List<String> parseListProperty(String property);  }### Answer:
@Test public void testParseMapProperty() { Assert.assertEquals( ImmutableMap.of("abc", "def"), ConfigurationPropertyValidator.parseMapProperty("abc=def")); Assert.assertEquals( ImmutableMap.of("abc", "def", "gh\\,i", "j\\\\\\,kl", "mno", "", "pqr", "stu"), ConfigurationPropertyValidator.parseMapProperty("abc=def,gh\\,i=j\\\\\\,kl,mno=,pqr=stu")); try { ConfigurationPropertyValidator.parseMapProperty("not valid"); Assert.fail(); } catch (IllegalArgumentException ignored) { } }