@Test(timeout=30000)
public void testDeletedTemplateFile() throws Exception {

    CountDownLatch removeTemplate = new CountDownLatch(1);        
    configureTemplateManager(null, removeTemplate);
    
    String expected = "<html><body>Hello John</body></html>";
    
    Map<String, Object> parameters = new HashMap<>();
    parameters.put("Name", "John");
    
    String rendered = templateManager.render("basic-email", parameters);
    assertEquals(expected, rendered);
          
    Files.delete(new File(templateDir, "basic-email.html").toPath());
    
    removeTemplate.await();        
    
    assertThat(templateManager.getRemoved()).hasSize(1).contains("basic-email");
}