### Question:
CommandLineUtil { public static List<File> parseFileList(String fileListOrNull) { if (fileListOrNull == null || fileListOrNull.isEmpty()) { return Collections.emptyList(); } List<File> results = new ArrayList<>(); int start = 0; while (true) { int index = fileListOrNull.indexOf(File.pathSeparatorChar, start); if (index < 0) { break; } if (start != index) { results.add(new File(fileListOrNull.substring(start, index).trim())); } start = index + 1; } results.add(new File(fileListOrNull.substring(start).trim())); return results; } private  CommandLineUtil(); static void prepareLogContext(); static Properties loadProperties(File path); static List<File> parseFileList(String fileListOrNull); static ClassLoader buildPluginLoader(ClassLoader parent, List<File> files); static List<Extension> loadExtensions(ClassLoader classLoader, List<ExtendedArgument> arguments); static final String LOG_CONTEXT_PREFIX; static final String SCHEME_CLASSPATH; }### Answer:
@Test public void parseFileList() throws Exception { File a = folder.newFile("a.properties").getCanonicalFile(); File b = folder.newFile("c.properties").getCanonicalFile(); File c = folder.newFile("b.properties").getCanonicalFile(); StringBuilder buf = new StringBuilder(); buf.append(a); buf.append(File.pathSeparatorChar); buf.append(b); buf.append(File.pathSeparatorChar); buf.append(c); List<File> result = canonicalize(CommandLineUtil.parseFileList(buf.toString())); assertThat(result, is(Arrays.asList(a, b, c))); }
@Test public void parseFileList_null() { List<File> result = canonicalize(CommandLineUtil.parseFileList(null)); assertThat(result, is(Collections.emptyList())); }
@Test public void parseFileList_empty() { List<File> result = canonicalize(CommandLineUtil.parseFileList("")); assertThat(result, is(Collections.emptyList())); }