public void tearDown() throws Exception {
CompiledModule.COMPILED_MODULES_ENABLED = false;
ProjectModulesManager projectModulesManager = ((ProjectModulesManager) nature.getAstManager()
.getModulesManager());
projectModulesManager.doRemoveSingleModule(new ModulesKey("foo", null));
projectModulesManager.doRemoveSingleModule(new ModulesKey("foo0", null));
projectModulesManager.doRemoveSingleModule(new ModulesKey("fooIn1", null));
projectModulesManager.doRemoveSingleModule(new ModulesKey("fooIn10", null));
projectModulesManager = ((ProjectModulesManager) nature2.getAstManager().getModulesManager());
projectModulesManager.doRemoveSingleModule(new ModulesKey("fooIn2", null));
projectModulesManager.doRemoveSingleModule(new ModulesKey("fooIn20", null));
if (baseDir.exists()) {
FileUtils.deleteDirectoryTree(baseDir);
}
super.tearDown();