void () { String depRoot = PathUtil.getParentPath(createFile("dep/A.java", "class A{}")); String mainRoot = PathUtil.getParentPath(createFile("main/B.java", "class B extends A{}")); JpsModule main = addModule("main", mainRoot); JpsModule dep = addModule("dep", depRoot); main.getDependenciesList().addModuleDependency(dep); rebuildAllModules(); }