### Question:
LessCompilerMojo extends AbstractWisdomWatcherMojo implements Constants { @Override public void execute() throws MojoExecutionException { less = npm(this, LESS_NPM_NAME, lessVersion); try { for (File file : getResources(ImmutableList.of("less"))) { if(!file.getName().startsWith("_")){ compile(file); } } } catch (WatchingException e) { throw new MojoExecutionException(e.getMessage(), e); } }  @Override void execute(); @Override boolean accept(File file); void compile(File file); @Override boolean fileCreated(File file); @Override boolean fileUpdated(File file); @Override boolean fileDeleted(File file); static final String LESS_NPM_NAME; static final String ERROR_TITLE; static final String LESS_VERSION; }### Answer:
@Test public void testProcessingOfLessFiles() throws MojoFailureException, MojoExecutionException, IOException { cleanup(); mojo.execute(); File style = new File(FAKE_PROJECT_TARGET, "classes/assets/less/style.css"); assertThat(style).isFile(); assertThat(FileUtils.readFileToString(style)) .contains("-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);") .contains("box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);") .contains("border-color: #fdcdea;") .contains("color: #fe33ac;"); style = new File(FAKE_PROJECT_TARGET, "wisdom/assets/style.css"); assertThat(style).isFile(); assertThat(FileUtils.readFileToString(style)) .contains("-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);") .contains("box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);") .contains("border-color: #fdcdea;") .contains("color: #fe33ac;"); }
@Test public void testUsingParameters() throws MojoFailureException, MojoExecutionException, IOException { cleanup(); mojo.lessArguments = " --compress " + "--clean-option=--advanced"; mojo.execute(); File style = new File(FAKE_PROJECT_TARGET, "classes/assets/less/style.css"); assertThat(style).isFile(); assertThat(FileUtils.readFileToString(style)) .contains("-webkit-box-shadow:0 0 5px rgba(0,0,0,0.3);"); style = new File(FAKE_PROJECT_TARGET, "wisdom/assets/style.css"); assertThat(style).isFile(); assertThat(FileUtils.readFileToString(style)) .contains("-webkit-box-shadow:0 0 5px rgba(0,0,0,0.3);"); }