void () { Module a = createModule("a"); Module b = createModule("b"); Module c = createModule("c"); ModuleRootModificationUtil.addDependency(a, b); ModuleRootModificationUtil.addDependency(b, c, DependencyScope.COMPILE, true); OrderEntry dependency = assertOneElement(findReachableViaThisDependencyOnly(a, b)).getKey(); assertSame(c, ((ModuleOrderEntry)dependency).getModule()); ModuleRootModificationUtil.addDependency(a, c); assertEmpty(findReachableViaThisDependencyOnly(a, b)); }