### Question:
NpmRunnerMojo extends AbstractWisdomWatcherMojo implements Constants { public void execute() throws MojoExecutionException { if (watchFilter == null) { removeFromWatching(); } NPM.npm(this, name, version).execute( binary != null ? binary : name, arguments); }  void execute(); @Override boolean accept(File file); @Override boolean fileCreated(File file); @Override boolean fileUpdated(File file); @Override boolean fileDeleted(File file);  }### Answer:
@Test public void testInstallationAndExecutionOfJade() throws IOException, MojoExecutionException { FileUtils.deleteQuietly(target); nodeDirectory.mkdirs(); NpmRunnerMojo runner = new NpmRunnerMojo(); runner.basedir = new File("target/project"); runner.setNodeManager(manager); runner.name = "jade"; runner.version = "1.5.0"; runner.binary = "jade"; runner.arguments = new String[] {"src/main/resources/assets", "--out", "target/classes/assets"}; runner.execute(); assertThat(new File(target, "classes/assets/template.html")).isFile(); }
@Test public void testInstallationOfJadeWithoutVersion() throws IOException, MojoExecutionException { FileUtils.deleteQuietly(nodeDirectory); nodeDirectory.mkdirs(); NpmRunnerMojo runner = new NpmRunnerMojo(); runner.setNodeManager(manager); runner.name = "jade"; runner.version = null; runner.binary = "jade"; runner.arguments = new String[] {"--help"}; runner.execute(); }