### Question:
DataConvertingUtility { static String[] split(String val, char ch) { int offset = 0; ArrayList<String> list = new ArrayList<>(); int nextPos = val.indexOf(ch, offset); while (nextPos != -1) { list.add(val.substring(offset, nextPos)); offset = nextPos + 1; nextPos = val.indexOf(ch, offset); } if (offset == 0) { return new String[]{val}; } list.add(val.substring(offset, val.length())); return list.toArray(new String[list.size()]); } 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 splitTest() throws Exception { assertArrayEquals(new String[]{"", "test1", "test2", "test3"}, DataConvertingUtility.split("/test1/test2/test3", '/')); assertArrayEquals(new String[]{"", "test1", "", "test3"}, DataConvertingUtility.split("/test1 assertArrayEquals(new String[]{"aa"}, DataConvertingUtility.split("aa", '/')); }