void () { JavaCoverageEngine engine = new JavaCoverageEngine() { @Override public boolean acceptedByFilters(@NotNull PsiFile psiFile, @NotNull CoverageSuitesBundle suite) { return false; } }; CoverageSuitesBundle suite = new CoverageSuitesBundle(new JavaCoverageSuite(engine)) { @NotNull @Override public ProjectData getCoverageData() { return new ProjectData() { @Override public ClassData getClassData(String name) { throw new RuntimeException("No classes are accepted by filter"); } }; } }; new JavaCoverageClassesAnnotator(suite, myProject, new Annotator() { @Override public void annotateClass(String classQualifiedName, PackageAnnotator.ClassCoverageInfo classCoverageInfo) { Assert.fail("No classes are accepted by filter"); } }).visitSuite(); }