void (ExternalAnnotationsManager manager, PsiMethod method, PsiParameter parameter, String expectedValue) { PsiAnnotation methodAnnotation = manager.findExternalAnnotation(method, AnnotationUtil.NULLABLE); assertNotNull(methodAnnotation); PsiAnnotationMemberValue methodValue = methodAnnotation.findAttributeValue("value"); assertNotNull(methodValue); assertEquals(expectedValue, methodValue.getText()); PsiAnnotation parameterAnnotation = manager.findExternalAnnotation(parameter, AnnotationUtil.NOT_NULL); assertNotNull(parameterAnnotation); PsiAnnotationMemberValue parameterValue = parameterAnnotation.findAttributeValue("value"); assertNotNull(parameterValue); assertEquals(expectedValue, parameterValue.getText()); }