### Question:
DataConvertingUtility { public static Map<String, String> parseUriQuery(String uriQuery) throws ParseException { if (uriQuery == null || uriQuery.length() == 0) { return null; } Map<String, String> result = new LinkedHashMap<>(); String[] params = uriQuery.substring(uriQuery.indexOf('?') + 1).split("&"); for (String prm : params) { String[] p = prm.split("=", 2); if (p.length != 2) { throw new ParseException("", 0); } result.put(p[0], p[1]); } return result; } private  DataConvertingUtility(); static Long readVariableULong(byte[] data); static Map<String, String> parseUriQuery(String uriQuery); static Map<String, List<String>> parseUriQueryMult(String uriQuery); static byte[] convertVariableUInt(long value); static String decodeToString(byte[] byteString); static byte[] encodeString(String payload); static byte[] intToByteArray(int value); static byte[] combine(byte[] arr1, byte[] arr2);  }### Answer:
@Test public void testParseUriQuery() throws ParseException { Map<String, String> q = new HashMap<>(); q.put("par1", "12"); assertEquals(q, parseUriQuery("par1=12")); assertEquals(q, parseUriQuery("?par1=12")); q.put("par2", "14"); assertEquals(q, parseUriQuery("par1=12&par2=14")); assertEquals(q, parseUriQuery("?par1=12&par2=14")); q.put("d", "b"); assertEquals(q, parseUriQuery("par1=12&par2=14&d=b")); assertNull(parseUriQuery(null)); assertNull(parseUriQuery("")); assertThatThrownBy(() -> parseUriQuery("p=aa&par133")).isExactlyInstanceOf(ParseException.class); }