void () { myFixture.configureByFile(getTestName(false) + ".java"); PsiClass aClass = myFixture.findClass("Apple"); JavaClassFindUsagesOptions options = new JavaClassFindUsagesOptions(getProject()); options.isFieldsUsages=true; options.isMethodsUsages=true; options.isUsages=true; CommonProcessors.CollectProcessor<UsageInfo> processor = new CommonProcessors.CollectProcessor<>(); FindUsagesManager findUsagesManager = ((FindManagerImpl)FindManager.getInstance(aClass.getProject())).getFindUsagesManager(); FindUsagesHandler handler = findUsagesManager.getFindUsagesHandler(aClass, false); assertNotNull(handler); handler.processElementUsages(aClass, processor, options); Collection<UsageInfo> usages = processor.getResults(); assertEmpty(StringUtil.join(usages, u -> u.getElement().getText() , ","), usages); }