void () { final String text = myFixture.getFile().getText(); final int indexOf = text.indexOf("dependencies"); assertTrue(indexOf > 0); final PsiElement resolve = GotoDeclarationAction.findTargetElement(getProject(), myFixture.getEditor(), indexOf); Assert.assertNotNull(resolve); Assert.assertEquals("packageJsonSchema.json", resolve.getContainingFile().getName()); Assert.assertEquals("\"dependencies\"", resolve.getText()); }