### Question:
CommonUtil { public static Map<String, String> parseUrlParams(String paramCfgs) { Map<String, String> params = new HashMap<>(); if (StringUtils.isBlank(paramCfgs)) { return params; } String[] cfgPairs = paramCfgs.split("&"); for (String cfgPair : cfgPairs) { String[] keyVal = cfgPair.split("="); if (keyVal.length > 1) { params.put(keyVal[0], keyVal[1]); } } return params; }  static Map<String, String> parseUrlParams(String paramCfgs); static long strToLong(String numStr, long defaultNum); static int strToInt(String numStr, int defaultNum); static int objectToInt(Object obj, int defaultNum); static long objectToLong(Object obj, long defaultNum); static boolean objectToBool(Object obj, boolean defaultVal); static String objectToStr(Object obj, String defaultStr); static T objectToClazzObj(Object obj, Class<T> clazz); static T objectToClazzObj(Object obj, Class<T> clazz, boolean returnNewIfNull); static String genExceptionMessage(Throwable e);  }### Answer:
@Test public void testParseUrlParams() { String emptyUrl = ""; Map<String, String> params = CommonUtil.parseUrlParams(emptyUrl); Assert.assertEquals(params, new HashMap<String, String>()); String noParamsUrl = "123456"; params = CommonUtil.parseUrlParams(noParamsUrl); Assert.assertEquals(params, new HashMap<String, String>()); String url = "abc&a=1&b=3"; params = CommonUtil.parseUrlParams(url); Map<String, String> result = new HashMap<>(); result.put("a", "1"); result.put("b", "3"); Assert.assertEquals(params, result); }