### Question:
UtilFolder { public static String getPathSeparator(String separator, String... path) { Check.notNull(separator); Check.notNull(path); final StringBuilder fullPath = new StringBuilder(path.length); for (int i = 0; i < path.length; i++) { if (i == path.length - 1) { fullPath.append(path[i]); } else if (path[i] != null && path[i].length() > 0) { fullPath.append(path[i]); if (!fullPath.substring(fullPath.length() - 1, fullPath.length()).equals(separator)) { fullPath.append(separator); } } } return fullPath.toString(); } private  UtilFolder(); static List<File> getDirectories(File path); static String getPath(String... path); static String getPathSeparator(String separator, String... path); static void deleteDirectory(File element); static boolean isDirectory(String path);  }### Answer:
@Test void testGetPathSeparator() { assertEquals("this%path%next", UtilFolder.getPathSeparator("%", "this", "path", "next")); assertEquals("this%path%next", UtilFolder.getPathSeparator("%", "this%", "path%", "next")); assertEquals("this%path%", UtilFolder.getPathSeparator("%", "this%", "path%", null, "")); }