### Question:
LogCompilation extends DefaultHandler implements ErrorHandler { public static void main(String[] args) throws Exception { Comparator<LogEvent> sort = LogParser.sortByStart; boolean statistics = false; boolean printInlining = false; boolean cleanup = false; boolean trapHistory = false; boolean printTimeStamps = false; boolean compare = false; boolean printID = true; int index = 0; while (args.length > index) { String a = args[index]; if (a.equals("-e")) { sort = LogParser.sortByElapsed; index++; } else if (a.equals("-n")) { sort = LogParser.sortByNameAndStart; index++; } else if (a.equals("-s")) { sort = LogParser.sortByStart; index++; } else if (a.equals("-t")) { printTimeStamps = true; index++; } else if (a.equals("-c")) { cleanup = true; index++; } else if (a.equals("-S")) { statistics = true; index++; } else if (a.equals("-U")) { trapHistory = true; index++; } else if (a.equals("-h")) { usage(0); } else if (a.equals("-i")) { printInlining = true; index++; } else if (a.equals("-C")) { compare = true; index++; } else if (a.equals("-d")) { printID = false; index++; } else { if (a.charAt(0) == '-') { System.out.println("Unknown option '" + a + "', assuming file name."); } break; } } if (index >= args.length) { usage(1); } if (compare) { compareLogs(index, args); return; } while (index < args.length) { ArrayList<LogEvent> events = null; try { events = LogParser.parse(args[index], cleanup); } catch (FileNotFoundException fnfe) { System.out.println("File not found: " + args[index]); System.exit(1); } Collections.sort(events, sort); if (statistics) { printStatistics(events, System.out); } else if (trapHistory) { printTrapHistory(events, System.out); } else { for (LogEvent c : events) { if (c instanceof NMethod) { continue; } if (printTimeStamps) { System.out.print(c.getStart() + ": "); } if (c instanceof Compilation) { Compilation comp = (Compilation) c; comp.print(System.out, printID, printInlining); } else { c.print(System.out, printID); } } } index++; } }  static void usage(int exitcode); static void main(String[] args); static void printStatistics(ArrayList<LogEvent> events, PrintStream out); static void printTrapHistory(ArrayList<LogEvent> events, PrintStream out);  }### Answer:
@Test public void testDashi() throws Exception { String[] args = {"-i", logFile }; LogCompilation.main(args); }
@Test public void testDashiDasht() throws Exception { String[] args = {"-i", "-t", logFile }; LogCompilation.main(args); }
@Test public void testDefault() throws Exception { String[] args = { logFile }; LogCompilation.main(args); }
@Test public void testDashS() throws Exception { String[] args = {"-S", logFile }; LogCompilation.main(args); }
@Test public void testDashU() throws Exception { String[] args = {"-U", logFile }; LogCompilation.main(args); }
@Test public void testDashe() throws Exception { String[] args = {"-e", logFile }; LogCompilation.main(args); }
@Test public void testDashn() throws Exception { String[] args = {"-n", logFile }; LogCompilation.main(args); }