### Question:
Generator { public void component(GenModel genModel, Path targetFolder) { generateArtifacts(genModel, targetFolder, "component", "$nameComponent.java.tpl", "$name.component.html.tpl", "$name.component.css.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 testComponent() throws Exception { GenModel genModel = new GenModel("app", "org.qbert.heroes_detail.HeroesDetail", TEST_VERSION); File fldr = folder.newFolder(); generator.component(genModel, fldr.toPath()); Path packFolder = fldr.toPath() .resolve("org/qbert/heroes_detail"); assertThat(packFolder.toFile() .listFiles()).hasSize(3); try (InputStream in = new FileInputStream(packFolder.resolve("HeroesDetailComponent.java") .toFile())) { String cmp = Util.copyToString(in); assertThat(cmp).contains("public class HeroesDetailComponent"); assertThat(cmp).contains("heroes-detail.component.html"); assertThat(cmp).contains("heroes-detail.component.css"); assertThat(cmp).contains("selector = \"app-heroes-detail\""); } try (InputStream in = new FileInputStream(packFolder.resolve("heroes-detail.component.html") .toFile())) { String html = Util.copyToString(in); assertThat(html).contains("heroes-detail works!"); } }