boolean (PsiClass clazz) { PsiFile psiFile = clazz.getContainingFile(); VirtualFile vFile = psiFile.getVirtualFile(); if (vFile == null) return false; return ProjectRootManager.getInstance(clazz.getProject()).getFileIndex().isInTestSourceContent(vFile); }