### Question:
DefaultLocalExecutor implements CompilerExecutor { @Override public CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath, String mavenRepoPath, String[] args) { return internalBuild(projectPath, mavenRepoPath, Boolean.FALSE, args); } DefaultLocalExecutor(ExecutorService executorService); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath,
                                                           String mavenRepoPath,
                                                           String settingXML); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath,
                                                           String mavenRepoPath,
                                                           String settingXML,
                                                           Map<Path, InputStream> override); @Override CompletableFuture<KieCompilationResponse> build(Path projectPath,
                                                           String mavenRepoPath,
                                                           String settingXML,
                                                           Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath,
                                                                     String mavenRepoPath,
                                                                     String settingXML); @Override CompletableFuture<KieCompilationResponse> buildAndInstall(Path projectPath,
                                                                     String mavenRepoPath,
                                                                     String settingXML,
                                                                     Boolean skipPrjDependenciesCreationList); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath,
                                                                      String mavenRepoPath,
                                                                      String[] args); @Override CompletableFuture<KieCompilationResponse> buildSpecialized(Path projectPath,
                                                                      String mavenRepoPath,
                                                                      String[] args,
                                                                      Boolean skipPrjDependenciesCreationList);  }### Answer:
@Test public void buildSpecializedNonExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot, mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS+ TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }
@Test public void buildSpecializedSkipDepsExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(Paths.get(tmpRoot.toAbsolutePath()+"/dummy"), mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS+ TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isTrue(); }
@Test public void buildSpecializedSkipDepsNonExistentProject() throws Exception{ DefaultLocalExecutor executor = new DefaultLocalExecutor(executorService); CompletableFuture<KieCompilationResponse> futureRes = executor.buildSpecialized(tmpRoot, mavenRepoPath, new String[]{MavenCLIArgs.ALTERNATE_USER_SETTINGS+ TestUtilMaven.getSettingsFile(), MavenCLIArgs.COMPILE}, Boolean.TRUE); KieCompilationResponse res = futureRes.get(); assertThat(res.isSuccessful()).isFalse(); }