void (String resultClassName, String resultFieldName, String... additionalPaths) { if (additionalPaths.length == 0) { myFixture.configureByFiles(getTestName(true) + ".fxml"); } else { myFixture.configureByFiles(additionalPaths); } final int offset = myFixture.getCaretOffset(); final PsiReference reference = myFixture.getFile().findReferenceAt(offset); assertNotNull(reference); final PsiClass resultClass = myFixture.getJavaFacade().findClass(resultClassName, GlobalSearchScope.allScope(getProject())); assertNotNull("Class " + resultClassName + " not found", resultClass); final PsiField resultField = resultClass.findFieldByName(resultFieldName, false); assertNotNull(resultField); assertEquals(resultField, reference.resolve()); }