private String[] commandLine(String testConfig, String loggerProps, String[] args) {
        List<String> commandLine = new ArrayList<>();
        commandLine.add("java");
        commandLine.add("-Djava.awt.headless=true");
        commandLine.add("-Dlog4j.configuration=file:" + getResourceAsUrl(loggerProps).getFile());
        commandLine.add("-Xmx128m");
        commandLine.add("-cp");
        String cp = System.getProperty("java.class.path");
        cp = ProcessUtils.escapeCommandLine(cp);

        commandLine.add(cp);
        commandLine.add("org.apache.tika.batch.fs.FSBatchProcessCLI");

        String configFile = null;
        try {
            configFile = Paths
                    .get(getResourceAsUri(testConfig))
                    .toAbsolutePath()
                    .toString();
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }

        commandLine.add("-bc");
        commandLine.add(configFile);
        commandLine.addAll(Arrays.asList(args));

        return commandLine.toArray(new String[0]);
    }
helper method equivalent to File#listFiles()
grabs children only, does not walk recursively

@param p
@return
tika-batch/src/test/java/org/apache/tika/batch/fs/FSBatchTestBase.java