void (final String expected, Map<String, String> options) { final String artifactName = UsefulTestCase.getTestName(getName(), true); final String artifactFileName = artifactName + ".jar"; final MockJavaFxPackager packager = new MockJavaFxPackager(artifactName + "/" + artifactFileName); final String title = options.get(TITLE); if (title != null) { packager.setTitle(title); } final String version = options.get(VERSION); if (version != null) { packager.setVersion(version); } String relativeToBaseDirPath = options.get(BASE_DIR_PATH); final String icon = options.get(ICONS); if (icon != null) { final String[] icons = icon.split(","); final JavaFxApplicationIcons appIcons = new JavaFxApplicationIcons(); appIcons.setLinuxIcon(icons[0]); appIcons.setMacIcon(icons[1]); appIcons.setWindowsIcon(icons[2]); packager.setIcons(appIcons); packager.setNativeBundle(JavaFxPackagerConstants.NativeBundles.all); } final String template = options.get(TEMPLATE); if (template != null) { packager.setHtmlTemplate(template); } final String placeholder = options.get(PLACEHOLDER); if (placeholder != null) { packager.setHtmlPlaceholderId(placeholder); } final String preloaderClass = options.get(PRELOADER_CLASS); if (preloaderClass != null) { packager.setPreloaderClass(preloaderClass); } final String preloaderJar = options.get(PRELOADER_JAR); if (preloaderJar != null) { packager.setPreloaderJar(preloaderJar); } if (options.containsKey(SIGNED)) { packager.setSigned(true); } if (options.containsKey(VERBOSE)) { packager.setMsgOutputLevel(JavaFxPackagerConstants.MsgOutputLevel.Verbose); } final List<JavaFxAntGenerator.SimpleTag> temp = JavaFxAntGenerator .createJarAndDeployTasks(packager, artifactFileName, artifactName, "temp", "temp" + "/" + "deploy", relativeToBaseDirPath); final StringBuilder buf = new StringBuilder(); for (JavaFxAntGenerator.SimpleTag tag : temp) { tag.generate(buf); } assertEquals(expected, buf.toString()); }