void () { JavaPsiFacade facade = JavaPsiFacade.getInstance(myProject); GlobalSearchScope allScope = GlobalSearchScope.allScope(myProject); Assume.assumeTrue("Maven import failed", facade.findClass("org.testng.Assert", allScope) != null && facade.findClass("com.univocity.test.OutputTester", allScope) != null); initCompiler(); PsiModificationTracker tracker = PsiManager.getInstance(myProject).getModificationTracker(); AtomicLong rebuildStamp = new AtomicLong(); PropertyChecker.customized() .withIterationCount(30).checkScenarios(() -> env -> { long startModCount = tracker.getModificationCount(); if (rebuildStamp.getAndSet(startModCount) != startModCount) { checkCompiles(myCompilerTester.rebuild()); } MadTestingUtil.changeAndRevert(myProject, () -> { env.executeCommands(Generator.constant(env1 -> { PsiJavaFile file = env1.generateValue(psiJavaFiles(), null); env1.logMessage("Open " + file.getVirtualFile().getPath() + " in editor"); if ("Example.java".equals(file.getName())) { env1.logMessage("OutputTester class: " + facade.findClass("com.univocity.test.OutputTester", allScope)); env1.logMessage("OutputTester files: " + FilenameIndex.getVirtualFilesByName("OutputTester.java", allScope)); env1.logMessage("content roots: " + Arrays.toString( ModuleRootManager.getInstance(ModuleManager.getInstance(myProject).getModules()[0]).getSourceRoots(true))); } env1.executeCommands(IntDistribution.uniform(1, 5), Generator.constant(new InvokeIntention(file, new JavaGreenIntentionPolicy()))); })); if (tracker.getModificationCount() != startModCount) { checkCompiles(myCompilerTester.make()); } }); }); }