void () { String depRoot = PathUtil.getParentPath(createFile("dep/A.java", "class A{}")); String testRoot = PathUtil.getParentPath(createFile("test/B.java", "class B extends A{}")); JpsModule main = addModule("main"); main.addSourceRoot(JpsPathUtil.pathToUrl(testRoot), JavaSourceRootType.TEST_SOURCE); JpsModule dep = addModule("dep", depRoot); main.getDependenciesList().addModuleDependency(dep); rebuildAllModules(); }