void () { // com.a<->com.b final CyclicDependenciesBuilder builder = new CyclicDependenciesBuilder(getProject(), new JavaAnalysisScope(JavaPsiFacade .getInstance(getProject()).findPackage("com"), null)); builder.analyze(); final HashMap<PsiPackage, Set<List<PsiPackage>>> cyclicDependencies = builder.getCyclicDependencies(); HashMap<String, String[][]> expected = new HashMap<>(); expected.put("com.b", new String[][]{{"com.a", "com.b"}}); expected.put("com.a", new String[][]{{"com.b", "com.a"}}); checkResult(expected, cyclicDependencies); }