void (String text, String... expected) { myFixture.configureByText("Test.java", text); PsiElement elementAtCaret = myFixture.getElementAtCaret(); PsiMethod member = PsiTreeUtil.getParentOfType(elementAtCaret, PsiMethod.class, false); assertNotNull(member); List<String> urls = JavaDocumentationProvider.getExternalJavaDocUrl(member); assertNotNull(urls); List<String> actual = ContainerUtil.map(urls, url -> url.substring(url.indexOf('#') + 1)); assertOrderedEquals(actual, expected); }