NullabilityAnnotationInfo (String className, String methodName) { JavaPsiFacade facade = JavaPsiFacade.getInstance(getProject()); GlobalSearchScope scope = GlobalSearchScope.allScope(getProject()); NullableNotNullManager manager = NullableNotNullManager.getInstance(getProject()); PsiClass testClass = facade.findClass(className, scope); assertNotNull(testClass); PsiMethod[] fooMethods = testClass.findMethodsByName(methodName, false); assertSize(1, fooMethods); return manager.findEffectiveNullabilityInfo(fooMethods[0]); }