### Question:
TemplateDeployer extends AbstractDeployer implements Deployer { @Validate public void start() { LOGGER.debug("Starting thymeleaf template deployer"); directory = configuration.getFileWithDefault("application.template.directory", "templates"); if (!directory.isDirectory()) { LOGGER.debug("Creating the template directory : {}", directory.getAbsolutePath()); directory.mkdirs(); } LOGGER.debug("Template directory set to {}", directory.getAbsolutePath()); watcher.add(new File(configuration.getBaseDir(), "templates"), true); }  @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 start() { 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); deployer.start(); deployer.stop(); }