void () { String path = PathManagerEx.getTestDataPath("/ide/importAction/module/foo.iml"); VirtualFile file = LocalFileSystem.getInstance().refreshAndFindFileByPath(path); assertNotNull(file); assertEquals(1, ModuleManager.getInstance(getProject()).getModules().length); Module module = importModuleFrom(new ModuleImportProvider(), file.getPath()); assertEquals("foo", module.getName()); assertEquals(2, ModuleManager.getInstance(getProject()).getModules().length); }