DependencyScope (@NotNull Library library) { VirtualFile[] files = library.getFiles(OrderRootType.CLASSES); if (files.length == 1 && LibraryUtil.isClassAvailableInLibrary(files, "org.testng.annotations.Test")) { return DependencyScope.TEST; } return null; }