ExeFile { String getFileName() { return fileName; } ExeFile(File exeDir, String fileNamePattern);   ExeFile(File exeDir, String executablePattern, Map<Object, Object> props); File extract();  }
@Test public void generates_file_name_for_darwin() { ExeFile exeFile = new ExeFile(new File("gherkin"), "gherkin-{{.OS}}-{{.Arch}}{{.Ext}}", new HashMap<Object, Object>() {{ put("os.name", "Mac OS X"); put("os.arch", "x86_64"); }}); assertEquals("gherkin-darwin-amd64", exeFile.getFileName()); }
@Test public void generates_file_name_for_windows() { ExeFile exeFile = new ExeFile(new File("gherkin"), "gherkin-{{.OS}}-{{.Arch}}{{.Ext}}", new HashMap<Object, Object>() {{ put("os.name", "Windows 10"); put("os.arch", "x86_32"); }}); assertEquals("gherkin-windows-386.exe", exeFile.getFileName()); }