void () { ModuleRootModificationUtil.addDependency(myJava8Module, myJava3Module); myFixture.addFileToProject("java3/MyLoader.java", "public class MyLoader extends ClassLoader { protected Object getClassLoadingLock(String className) {} }"); PsiFile file = myFixture.addFileToProject("java8/Usage.java", "class My extends MyLoader {{ " + " <caret>getClassLoadingLock(\"\"); " + "}}\n" + "class Standard extends ClassLoader {{ " + " getClassLoadingLock(\"\"); " + "}}"); myFixture.configureFromExistingVirtualFile(file.getVirtualFile()); myFixture.checkHighlighting(); HighlightUsagesHandler.invoke(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile()); assertSize(2, myFixture.getEditor().getMarkupModel().getAllHighlighters()); }