### Question:
ES4X extends Launcher { public static void main(String... args) { final ES4X launcher = new ES4X(); if (args.length == 1) { boolean isFileOrDir; try { isFileOrDir = new File(args[0]).exists(); } catch (SecurityException e) { isFileOrDir = false; } if (isFileOrDir) { launcher.execute("run", args); return; } } launcher.dispatch(args); }  @Override void beforeStartingVertx(VertxOptions options); static void main(String... args);  }### Answer:
@Test public void testRun() throws IOException { File script = new File("unittest.js"); script.deleteOnExit(); try(OutputStream out = new FileOutputStream(script)) { out.write("console.log('Hello from unittest!');".getBytes()); } ES4X.main("run", script.getAbsolutePath()); }
@Test public void testLauncher() { ES4X.main("--help"); }