PKPassTemplateFolder implements IPKPassTemplate { @Override public void provisionPassAtDirectory(File tempPassDir) throws IOException { FileUtils.copyDirectory(templateDir, tempPassDir); } PKPassTemplateFolder(URL fileUrlOfTemplateDirectory);  PKPassTemplateFolder(String pathToTemplateDirectory); @Override void provisionPassAtDirectory(File tempPassDir); @Override Map<String, ByteBuffer> getAllFiles();  }
@Test public void provisionTest() throws IOException, URISyntaxException { File tempPassDir = Files.createTempDir(); pkPassTemplateFolder.provisionPassAtDirectory(tempPassDir); RegexFileFilter regexFileFilter = new RegexFileFilter("^(.*?)"); Collection<File> templateFiles = FileUtils.listFiles(new File(PASS_TEMPLATE_FOLDER), regexFileFilter, DirectoryFileFilter.DIRECTORY); Collection<File> createdFiles = FileUtils.listFiles(tempPassDir, regexFileFilter, DirectoryFileFilter.DIRECTORY); Assert.assertEquals(createdFiles.size(), templateFiles.size()); }