ApplicationPreprocessor { public void run() throws IOException, TransformerException, ParserConfigurationException, SAXException { DeployLogger logger = new BaseDeployLogger(); FilesApplicationPackage.Builder applicationPackageBuilder = new FilesApplicationPackage.Builder(applicationDir); outputDir.ifPresent(applicationPackageBuilder::preprocessedDir); ApplicationPackage preprocessed = applicationPackageBuilder.build().preprocess( new Zone(environment.orElse(Environment.defaultEnvironment()), region.orElse(RegionName.defaultName())), logger); preprocessed.validateXML(); } ApplicationPreprocessor(File applicationDir, Optional<File> outputDir, Optional<Environment> environment, Optional<RegionName> region); void run(); static void main(String args[]);  }
@Test public void basic() throws ParserConfigurationException, TransformerException, SAXException, IOException { ApplicationPreprocessor preprocessor = new ApplicationPreprocessor(new File("src/test/resources/simple"), Optional.of(outputDir.newFolder()), Optional.empty(), Optional.empty()); preprocessor.run(); }