void (int expectedOffset, String filePath, int lineNum, int columnNumber) { SMTestProxy testProxy = new SMTestProxy("myTest", false, "file://" + filePath + ":" + lineNum + (columnNumber > 0 ? (":" + columnNumber) : "")); testProxy.setLocator(FileUrlProvider.INSTANCE); Location location = testProxy.getLocation(getProject(), GlobalSearchScope.allScope(getProject())); assertNotNull(location); PsiElement element = location.getPsiElement(); assertNotNull(element); assertEquals(expectedOffset, element.getTextOffset()); }