AntennaComplianceTool { public static void main(String[] args) { AntennaComplianceToolOptions options = AntennaComplianceToolOptions.parse(args); if (options.isShowHelp()) { printUsage(); System.exit(1); } if (options.isDebugLog()) { enableDebugLogging(); } try { Path propertiesFile = Paths.get(options.getPropertiesFilePath()).toAbsolutePath(); if (!propertiesFile.toFile().exists()) { LOGGER.error("Cannot find {}", propertiesFile); throw new IllegalArgumentException("Cannot find " + propertiesFile); } LOGGER.info("Starting Compliance Tool with mode '{}'", options.getComplianceMode()); System.exit(new AntennaComplianceTool().execute(options.getComplianceMode(), options.getParameters(), propertiesFile)); } catch (Exception e) { LOGGER.error("Error:", e); System.exit(1); } }  static void main(String[] args);  }
@Test public void testMainFailsWithEmptyArgs() { exit.expectSystemExitWithStatus(1); AntennaComplianceTool.main(new String[]{}); }
@Test public void testMainFailsWithNonExistentComplianceToolArgs() throws IOException { exit.expectSystemExitWithStatus(1); File testFile = folder.newFile("test"); AntennaComplianceTool.main(new String[]{"non-existent-option", testFile.getAbsolutePath()}); }
@Test public void testMainFailsWithNonExistentFilenameArgs() { exit.expectSystemExitWithStatus(1); AntennaComplianceTool.main(new String[]{"non-existent-option", "non-existent-file"}); }