LocalResourcePackFile implements TemplatePack { @Override public Template getTemplateByName(String template) throws IOException { return new Template(template, null, getAsByteArray(normalize(template))); } LocalResourcePackFile(TemplatePackInfo templatePackInfo, File packRoot); @Override String getName(); TemplatePackInfo getTemplatePackInfo(); @Override List<String> getTemplateNames(); @Override Template getTemplateByName(String template);  }
@Test(expected = IllegalArgumentException.class) public void templateNotInFileList() throws IOException { TemplatePack pack = new LocalResourcePackFile(new TemplatePackInfo("dummy"), new File("src/test/resources/templates/3-files-subfolder")); pack.getTemplateByName("unkown.txt"); }