private static void assertMethodAndParameterAnnotationsValues(
      ExternalAnnotationsManager manager,
      PsiMethod method,
      PsiParameter parameter,
      String expectedValue) {
    PsiAnnotation methodAnnotation =
        manager.findExternalAnnotation(method, AnnotationUtil.NULLABLE);
    assertNotNull(methodAnnotation);
    assertEquals(expectedValue, methodAnnotation.findAttributeValue("value").getText());

    PsiAnnotation parameterAnnotation =
        manager.findExternalAnnotation(parameter, AnnotationUtil.NOT_NULL);
    assertNotNull(parameterAnnotation);
    assertEquals(expectedValue, parameterAnnotation.findAttributeValue("value").getText());
  }