### Question:
UrlUtils { public static String paramsMapToString(Map<String, String[]> params) { StringBuilder paramsString = new StringBuilder(); for (Entry<String, String[]> param : params.entrySet()) { if (paramsString != null) { paramsString.append("&"); } paramsString.append(param.getKey()); paramsString.append("="); for (int i = 0; i < param.getValue().length; i++) { if (i == 0) { paramsString.append(param.getValue()[i]); } else { paramsString.append(","); paramsString.append(param.getValue()[i]); } } } return paramsString.toString(); }  static String paramsMapToString(Map<String, String[]> params); static String arrayToString(String[] values);  }### Answer:
@Test public void testParamsMapToString() { Map<String, String[]> params = new HashMap<>(); params.put("a", new String[]{"1", "2", "3"}); params.put("b", new String[]{"8", "7", "6"}); String result = UrlUtils.paramsMapToString(params); Assert.assertEquals(result, "&a=1,2,3&b=8,7,6"); }