void () { PsiElement target = resolve(); assertTrue(target instanceof PsiField); PsiField targetField = (PsiField)target; PsiType type = targetField.getType(); assertEquals(PsiTypes.intType(), type); PsiJavaFile file = (PsiJavaFile)getFile(); PsiClass record = file.getClasses()[0]; assertNavigatesToFirstRecordComponent(record, target); assertEquals(List.of("F", "T"), ContainerUtil.map(targetField.getAnnotations(), PsiAnnotation::getQualifiedName)); assertEquals(List.of("T"), ContainerUtil.map(type.getAnnotations(), PsiAnnotation::getQualifiedName)); assertTrue(targetField.hasAnnotation("F")); assertNotNull(targetField.getAnnotation("F")); assertTrue(targetField.getModifierList().hasAnnotation("F")); assertTrue(targetField.hasAnnotation("T")); assertFalse(targetField.hasAnnotation("M")); assertNull(targetField.getAnnotation("M")); }