boolean (@NotNull GlobalSearchScope globalSearchScope, @NotNull JavaPsiFacade psiFacade) { boolean hasPlatformEngine = ReadAction.compute(() -> { PsiPackage aPackage = psiFacade.findPackage(JUnitCommonClassNames.ORG_JUNIT_PLATFORM_ENGINE); return aPackage != null && aPackage.getDirectories(globalSearchScope).length > 0; }); if (!hasPlatformEngine) return false; ClassLoader loader = TestClassCollector.createUsersClassLoader(myConfiguration); try { ServiceLoader<?> serviceLoader = ServiceLoader.load(Class.forName(JUnitCommonClassNames.ORG_JUNIT_PLATFORM_ENGINE_TEST_ENGINE, false, loader), loader); for (Object engine : serviceLoader) { String engineClassName = engine.getClass().getName(); if (isCustomJunit5TestEngineName(engineClassName)) { return true; } } return false; } catch (Throwable e) { return false; } }