IFolder outputFolder = getProject().getFolder("output");
assertNotExists(outputFolder);
// do the action
GenerateCodeActionAndView action = new GenerateCodeActionAndView();
runAction(action, targetModel);
// the output folder should now be created
assertExists(outputFolder);
// a sitemap should have been created
IFile sitemap = outputFolder.getFile("sitemap.html");
assertExists(sitemap);
// and the browser window should have been created
IWebBrowser browser = action.getCreatedBrowser();
assertNotNull("Browser was not created", browser);
}