### Question:
TemplateDeployer extends AbstractDeployer implements Deployer { @Override public boolean accept(File file) { return file.getName().endsWith(engine.extension()); }  @Validate void start(); @Invalidate void stop(); @Override boolean accept(File file); @Override void onFileCreate(File file); @Override void onFileChange(File file); @Override void onFileDelete(File file);  }### Answer:
@Test public void testAccept() { TemplateDeployer deployer = new TemplateDeployer(); deployer.watcher = mock(Watcher.class); deployer.configuration = mock(ApplicationConfiguration.class); when(deployer.configuration.getBaseDir()).thenReturn(directory); when(deployer.configuration.getFileWithDefault("application.template.directory", "templates")).thenReturn(new File(directory, "templates")); deployer.engine = mock(ThymeleafTemplateCollector.class); when(deployer.engine.extension()).thenReturn(ThymeleafTemplateCollector.THYMELEAF_TEMPLATE_EXTENSION); assertThat(deployer.accept(new File("src/test/resources/templates/javascript.thl.html"))).isTrue(); assertThat(deployer.accept(new File("src/test/resources/templates/raw.html"))).isFalse(); }