ClasspathScanMojo extends AbstractMojo { @Override public void execute() throws MojoExecutionException, MojoFailureException { if (this.skip) { skipMojo(); } else { executeMojo(); } }  @Override void execute();  }
@Test void apply_skipTrue() throws IllegalAccessException, NoSuchFieldException, IOException, MojoExecutionException, MojoFailureException { ClasspathScanMojo mojo = new ClasspathScanMojo(); setSkip(mojo, true); File outputDirectory = setOutputDirectory(mojo); mojo.execute(); File metaInfFolder = new File(outputDirectory, "META-INF"); assertThat(metaInfFolder.exists()) .isEqualTo(Boolean.FALSE); }