File outputFile = new File(outputDir, fileName);
outputFile.getParentFile().mkdirs();
SugarGenerator sugarGenerator = new SugarGenerator();
try {
sugarGenerator.addWriter(new HamcrestFactoryWriter(
packageName, shortClassName, new FileWriter(outputFile)));
sugarGenerator.addWriter(new QuickReferenceWriter(System.out));
XmlConfigurator xmlConfigurator
= new XmlConfigurator(sugarGenerator, XmlConfigurator.class.getClassLoader());