### Question:
Logalyzer { public static void main(String[] args) { Log LOG = LogFactory.getLog(Logalyzer.class); String version = "Logalyzer.0.0.1"; String usage = "Usage: Logalyzer [-archive -logs <urlsFile>] " + "-archiveDir <archiveDirectory> " + "-grep <pattern> -sort <column1,column2,...> -separator <separator> " + "-analysis <outputDirectory>"; System.out.println(version); if (args.length == 0) { System.err.println(usage); System.exit(-1); } boolean archive = false; boolean grep = false; boolean sort = false; String archiveDir = ""; String logListURI = ""; String grepPattern = ".*"; String sortColumns = ""; String columnSeparator = " "; String outputDirectory = ""; for (int i = 0; i < args.length; i++) { if (args[i].equals("-archive")) { archive = true; } else if (args[i].equals("-archiveDir")) { archiveDir = args[++i]; } else if (args[i].equals("-grep")) { grep = true; grepPattern = args[++i]; } else if (args[i].equals("-logs")) { logListURI = args[++i]; } else if (args[i].equals("-sort")) { sort = true; sortColumns = args[++i]; } else if (args[i].equals("-separator")) { columnSeparator = args[++i]; } else if (args[i].equals("-analysis")) { outputDirectory = args[++i]; } } LOG.info("analysisDir = " + outputDirectory); LOG.info("archiveDir = " + archiveDir); LOG.info("logListURI = " + logListURI); LOG.info("grepPattern = " + grepPattern); LOG.info("sortColumns = " + sortColumns); LOG.info("separator = " + columnSeparator); try { Logalyzer logalyzer = new Logalyzer(); if (archive) { logalyzer.doArchive(logListURI, archiveDir); } if (grep || sort) { logalyzer.doAnalyze(archiveDir, outputDirectory, grepPattern, sortColumns, columnSeparator); } } catch (IOException ioe) { ioe.printStackTrace(); System.exit(-1); } }  void doArchive(String logListURI, String archiveDirectory); void doAnalyze(String inputFilesDirectory, String outputDirectory,
              String grepPattern, String sortColumns, String columnSeparator); static void main(String[] args); static final String SORT_COLUMNS; static final String COLUMN_SEPARATOR; }### Answer:
@Test public void testLogalyzer() throws Exception { Path f = createLogFile(); String[] args = new String[10]; args[0] = "-archiveDir"; args[1] = f.toString(); args[2] = "-grep"; args[3] = "44"; args[4] = "-sort"; args[5] = "0"; args[6] = "-analysis"; args[7] = outdir.getAbsolutePath(); args[8] = "-separator"; args[9] = " "; Logalyzer.main(args); checkResult(); }