void () { final String controllerClassName = getTestName(false) + "Controller"; myFixture.configureByFiles(getTestName(true) + ".fxml", controllerClassName + ".java"); final PsiClass controllerClass = myFixture.findClass(controllerClassName); assertNotNull(controllerClass); assertTrue(controllerClass.getFields().length > 0); final int offset = myFixture.getCaretOffset(); final PsiReference reference = myFixture.getFile().findReferenceAt(offset); assertNotNull(reference); assertEquals(controllerClass.getFields()[0], reference.resolve()); }