void () { doTestRunnableFindUsagesWithExcludesConfiguration(configuration -> { final VirtualFile dirToExclude = findClass("Foo").getContainingFile().getVirtualFile(); configuration.addExcludeEntryDescription(new ExcludeEntryDescription(dirToExclude, false, true, myProject)); }, 2, "Foo.java", "Bar.java"); }