void () { final int offset = myEditor.getCaretModel().getOffset(); final PsiElement elementAtCaret = myFile.findElementAt(offset); assertNotNull(elementAtCaret); final PsiElement targetElement = GotoDeclarationAction.findTargetElement(myProject, myEditor, offset); final PropertiesFile propertiesFile = findPropertiesFile(); final IProperty property = assertInstanceOf(targetElement, IProperty.class); assertEquals(property.getPropertiesFile(), propertiesFile); final String elementText = elementAtCaret.getText(); final String unescapedKey = property.getUnescapedKey(); assertNotNull(unescapedKey); assertTrue(elementText.contains(unescapedKey)); }