void () { myFixture.configureByText("a.java", """ import lombok.experimental.var; abstract class Test { private void test() { int[] myArray = new int[] {1, 2, 3, 4, 5}; for(var my<caret>Var: myArray) { } }\s } """); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); assertTrue(elementAtCaret instanceof PsiIdentifier); final PsiElement localParameter = elementAtCaret.getParent(); assertTrue(localParameter.toString(), localParameter instanceof PsiParameter); final PsiType type = ((PsiParameter) localParameter).getType(); assertNotNull(localParameter.toString(), type); assertTrue(type.getCanonicalText(), type.equalsToText("int")); }