### Question:
Generator { public void directive(GenModel genModel, Path targetFolder) { generateArtifacts(genModel, targetFolder, "directive", "$nameDirective.java.tpl"); }  void directive(GenModel genModel, Path targetFolder); void mod(GenModel genModel, Path targetFolder); void pipe(GenModel genModel, Path targetFolder); void component(GenModel genModel, Path targetFolder); void service(GenModel genModel, Path targetFolder); void project(GenModel genModel, Path targetFolder); Consumer<String> getLog(); void setLog(Consumer<String> log);  }### Answer:
@Test public void testDirective() throws Exception { GenModel genModel = new GenModel("app", "org.qbert.UpperCase", TEST_VERSION); File fldr = folder.newFolder(); generator.directive(genModel, fldr.toPath()); Path packFolder = fldr.toPath() .resolve("org/qbert"); assertThat(packFolder.toFile() .listFiles()).hasSize(1); try (InputStream in = new FileInputStream(packFolder.resolve("UpperCaseDirective.java") .toFile())) { String cmp = Util.copyToString(in); assertThat(cmp).contains("public class UpperCaseDirective"); assertThat(cmp).contains("[appUpperCase]"); } }