void () { FindModel model = new FindModel(); final PsiClass aClass = myJavaFacade.findClass("LibraryClass1"); assertNotNull(aClass); model.setDirectoryName(aClass.getContainingFile().getContainingDirectory().getVirtualFile().getPath()); model.setCaseSensitive(true); model.setCustomScope(false); model.setStringToFind("LibraryClass1"); model.setProjectScope(false); List<UsageInfo> usages = Collections.synchronizedList(new ArrayList<>()); Processor<UsageInfo> consumer = new CommonProcessors.CollectProcessor<>(usages); FindUsagesProcessPresentation presentation = FindInProjectUtil.setupProcessPresentation(false, FindInProjectUtil.setupViewPresentation(false, model)); FindInProjectUtil.findUsages(model, getProject(), consumer, presentation); assertSize(2, usages); }