W3CWidgetFactory fac = new W3CWidgetFactory();
fac.setStartPageProcessor(null);
File outputDir = new File("src-tests" + File.separatorChar + "testdata" + File.separatorChar + "widgets");
outputDir.mkdirs();
fac.setOutputDirectory("src-tests" + File.separatorChar + "testdata" + File.separatorChar + "widgets");
W3CWidget widget = fac.parse(downloadedFile);
File file = fac.getUnzippedWidgetDirectory();
assertEquals("src-tests" + File.separatorChar + "testdata"
+ File.separatorChar + "widgets" + File.separatorChar
+ "www.getwookie.org" + File.separatorChar + "widgets"
+ File.separatorChar + "weather", file.getPath());
assertTrue(file.isDirectory());
assertEquals(WIDGET_ID_WEATHER, widget.getIdentifier());
//clean up
FileUtils.deleteDirectory(outputDir);
FileUtils.deleteQuietly(downloadedFile);
}