EscapeUtil { public static List<String> parsePath(String pPath) { if (pPath == null || pPath.equals("") || pPath.equals("/")) { return null; } return replaceWildcardsWithNull(split(pPath, PATH_ESCAPE, "/")); } private  EscapeUtil(); static String combineToPath(List<String> pParts); static List<String> parsePath(String pPath); static Stack<String> extractElementsFromPath(String pPath); static Stack<String> reversePath(List<String> pathParts); static List<String> split(String pArg, String pEscape, String pDelimiter); static String[] splitAsArray(String pArg, String pEscape, String pDelimiter); static String escape(String pArg, String pEscape, String pDelimiter); static final String PATH_ESCAPE; static final String CSV_ESCAPE; }
@Test public void pathSplitting() { for (int i = 0; i< PATH_SPLIT_TEST_DATA.length; i += 3) { List got = EscapeUtil.parsePath((String) PATH_SPLIT_TEST_DATA[i]); assertEquals(got, (List<String>) PATH_SPLIT_TEST_DATA[i+1]); } }